Created
April 28, 2018 14:48
-
-
Save fnzv/4753ec1670e594193eb12129dc48d70c to your computer and use it in GitHub Desktop.
Generic systemd unit for simple service
This file contains 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
systemctl daemon-reload | |
systemctl enable generic.service | |
systemctl start generic.service |
This file contains 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=My Miscellaneous Service | |
After=network.target | |
[Service] | |
Type=simple | |
User=user | |
WorkingDirectory=/home/ubuntu | |
ExecStart=mypath_to_binary | |
Restart=on-failure # or always, on-abort, etc | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment