Created
June 19, 2019 14:14
-
-
Save Kirill/e32c2d9392bccb84949acd947dc1d20f to your computer and use it in GitHub Desktop.
Simple service for Linux: /etc/systemd/system/simple.service
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=Simple Service Description | |
After=syslog.target | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/usr/local/bin | |
User=root | |
Group=root | |
PermissionsStartOnly=true | |
ExecStartPre=/bin/mkdir -p /var/log/simple | |
ExecStartPre=/bin/chmod 640 /var/log/simple | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=simple | |
OOMScoreAdjust=-100 | |
ExecStart=/usr/local/bin/simpleapp | |
ExecStop=/bin/kill -s QUIT $MAINPID | |
TimeoutSec=300 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment