Created
August 14, 2018 13:36
-
-
Save xlbruce/f3ac5ccf2bb4853f4fbf1ec6ca4c187b to your computer and use it in GitHub Desktop.
Systemd service template
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=My Service Name | |
After=network.target | |
[Service] | |
Type=simple | |
User=<user> | |
Group=<group> | |
WorkingDirectory=/opt/app | |
ExecStart=/bin/ls -lh | |
ExecStop=/bin/kill -9 $MAINPID | |
SuccessExitStatus=0 | |
TimeoutSec=300 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment