-
-
Save teward/ba5d194d95fdfead98d2d2ee5a9d2887 to your computer and use it in GitHub Desktop.
SystemD service for SmokeDetector
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
# To be put into /etc/systemd/system/... or similar location for SystemD units. | |
[Unit] | |
Description=SmokeDetector StackOverflow Anti-Spam ChatBot | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
ExecStart=/path/to/SmokeDetector/nocrash.py standby | |
Type=simple | |
User=USERTORUNAS | |
Group=GROUPTORUNAS | |
WorkingDirectory=/path/to/SmokeDetector | |
# Make sure the directory here is created with the seame ownership rights that user/group specify! | |
StandardOutput=file:/var/log/smokedetector/output.log | |
StandardError=file:/var/log/smokedetector/error.log | |
Restart=on-failure | |
RestartSec=10s | |
SuccessExitStatus=SIGINT SIGKILL | |
RestartPreventExitStatus=SIGINT SIGKILL | |
[Install] | |
WantedBy=multi-user.target | |
Alias=smokey.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment