Last active
March 10, 2022 15:48
-
-
Save circa10a/e6cfc673af9282d17dfb958ef6adabeb to your computer and use it in GitHub Desktop.
A Simple 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
#/etc/systemd/system/test.service | |
[Unit] | |
Description=Test Systemd Service | |
[Service] | |
ExecStartPre=/usr/bin/echo -e "\033[0;33m Pre start \033[0m" | |
ExecStart=/usr/bin/sleep 10 | |
ExecStartPost=/usr/bin/echo -e "\033[0;33m Post start \033[0m" | |
ExecStop=/usr/bin/pkill -f sleep | |
ExecStopPost=/usr/bin/echo -e "\033[0;33m Post stop \033[0m" | |
Restart=always | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target |
@bahner thanks for the catch, fixed it.
Here I am googling a simple service definition and look who the owner is @circa10
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Missing a "t" at the end.