Created
June 2, 2019 22:13
-
-
Save isaacgr/163db142e89df6212686f8fe91d5bde6 to your computer and use it in GitHub Desktop.
Systemd service file. Includes environment variables and logging.
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=Web Client Service | |
After=multi-user.target | |
[email protected] | |
[Service] | |
Type=simple | |
# optional environment variable location which will be converted to variables readable by this file | |
# in this case $FLAGS | |
EnvironmentFile=/etc/default/webclient | |
ExecStart=/usr/bin/python /usr/local/bin/client/main.py $FLAGS | |
StandardInput=tty-force | |
# comment out the standard output or error if script includes logging to a file already | |
StandardOutput=file:/var/log/webclient.log | |
StandardError=file:/var/log/webclient.log | |
Restart=always | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment