Systemctl

From The World according to Vissie
Jump to navigation Jump to search
https://www.tecmint.com/create-new-service-units-in-systemd/

Add a service

vim: /etc/systemd/system/myservice.service
# systemd unit file
#
# place in /etc/systemd/system
# systemctl enable myservice.service                                                                                                                   
# systemctl start myservice.service

[Unit]
Description=Some lekker lekker description
After=network.target

[Service]
User=root
Group=root

WorkingDirectory=/home/user/src/app
ExecStart=/usr/bin/node app.js --my --settings

[Install]
WantedBy=multi-user.target