Last active
December 25, 2017 22:37
-
-
Save fastmover/e8e41c761d2132ea240c542fe60bb780 to your computer and use it in GitHub Desktop.
For Ubuntu 16.04, create a new file in /etc/systemd/system/ with the name you'd like to use for this service. This is the name you'll be using for service `name` start/stop. Change line 10 to reflect the executable you're going to use. Then run `systemctl enable [service name]`. Then start the service: service [name] start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Some Service | |
After=network.target | |
[Service] | |
Restart=always | |
Type=simple | |
User=root | |
ExecStart=/usr/local/bin/[binary-name] | |
#ExecStop=/usr/local/bin/[binary-name] stop | |
RemainAfterExit=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment