- Modify the
Description,ExecStartfields for your application. - Place the file in
/lib/systemd/system/with.serviceextension. Eg./lib/systemd/system/example-webapp.service - Perform a daemon-relaod
systemctl daemon-reloadand the start the service withsystemctl start example-webapp0.service
Created
November 22, 2020 10:12
-
-
Save heyadityak/ab2e46988cccc0a5e6dd289065551d8d to your computer and use it in GitHub Desktop.
TLDR instructions and template - SystemD service
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 awesome webapp | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| RestartSec=5s | |
| ExecStart=/var/www/webapp.bin | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment