Setup Systemd Service on Ubuntu 16.04

$ sudo vim /etc/systemd/system/myservice.service [Unit] Description=Run the service [Service] User=ubuntu # change the workspace WorkingDirectory=/usr/local/src #path to executable. #executable is a bash script which calls jar file ExecStart=/usr/local/src/somescript SuccessExitStatus=143 TimeoutStopSec=10 Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target $ sudo vim /usr/local/src/somescript #!/bin/sh java -jar /some/file.jar sudo systemctl daemon-reload sudo systemctl enable myservice.service sudo systemctl start myservice sudo systemctl … Read more

Setup Simple Ruby on Rails App On Ubuntu 16.04 From Scratch

Rails is one of the most popular ruby framework out there. And now, I want to try to run the simple app on Ubuntu 16.04 machine. it’s for testing purpose. First, update the system and install essential dependencies: $ sudo apt-get update $ sudo apt-get build-essential curl sudo vim Install nodejs: $ curl -sL https://deb.nodesource.com/setup_9.x … Read more

Linux machine Failed to hibernate, “system via logind: Sleep verb not supported”

So after using fedora 28 for a while. I tried to configure my power management using xfce power management system. Looking at these power management settings, are very simple explanation. I set my machine to hibernate or sleep mode when inactive for 16 minutes. Saved the settings. then I closed the laptop lid, so it … Read more

Setup ftp that works with local user with vsftpd on ubuntu

This is the step-by-step installation of vsftpd that actually works. If you have website that runs wordpress, you might want to enable this to be able install/update your wordpress plugin. Install vsftpd and start the service: $ sudo apt-get install vsftpd -y $ sudo systemctl start vsftpd.service $ sudo systemctl enable vsftpd.service Open vsftpd.conf file, and … Read more