mirror of
https://github.com/thesephist/monocle.git
synced 2021-07-26 21:13:15 +03:00
30 lines
678 B
Desktop File
Executable File
30 lines
678 B
Desktop File
Executable File
[Unit]
|
|
Description=monocle server
|
|
ConditionPathExists=/home/monocle-user/go/bin/ink
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=monocle-user
|
|
LimitNOFILE=1024
|
|
PermissionsStartOnly=true
|
|
|
|
Restart=on-failure
|
|
RestartSec=100ms
|
|
StartLimitIntervalSec=60
|
|
|
|
WorkingDirectory=/home/monocle-user/monocle
|
|
ExecStart=/home/monocle-user/go/bin/ink ./src/main.ink
|
|
|
|
# make sure log directory exists and owned by syslog
|
|
PermissionsStartOnly=true
|
|
ExecStartPre=/bin/mkdir -p /var/log/monocle
|
|
ExecStartPre=/bin/chown syslog:adm /var/log/monocle
|
|
ExecStartPre=/bin/chmod 755 /var/log/monocle
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=monocle
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|