Created
August 23, 2018 07:37
-
-
Save tonymtz/cf0b29b472597c96cac5f949e9452631 to your computer and use it in GitHub Desktop.
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=Gatomocho service | |
ConditionPathExists=/home/ubuntu/work/src/gatomocho/main | |
After=network.target | |
[Service] | |
Type=simple | |
User=gatomocho | |
Group=gatomocho | |
LimitNOFILE=1024 | |
Restart=on-failure | |
RestartSec=10 | |
startLimitIntervalSec=60 | |
WorkingDirectory=/home/ubuntu/work/src/gatomocho | |
ExecStart=/home/ubuntu/work/src/gatomocho/main | |
# make sure log directory exists and owned by syslog | |
PermissionsStartOnly=true | |
ExecStartPre=/bin/mkdir -p /var/log/gatomocho | |
ExecStartPre=/bin/chown syslog:adm /var/log/gatomocho | |
ExecStartPre=/bin/chmod 755 /var/log/gatomocho | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=gatomocho | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment