Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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