added systemd instructions
This commit is contained in:
7
contrib/config
Normal file
7
contrib/config
Normal file
@@ -0,0 +1,7 @@
|
||||
music-path
|
||||
cache-path /tmp/gonic_cache
|
||||
db-path /var/gonic/gonic.db
|
||||
jukebox-enabled false
|
||||
listen-addr 127.0.0.1:4747
|
||||
proxy-prefix /gonic
|
||||
scan-interval 0
|
||||
28
contrib/gonic.service
Normal file
28
contrib/gonic.service
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Gonic service
|
||||
ConditionPathExists=/var/gonic/gonic
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=gonic
|
||||
Group=gonic
|
||||
LimitNOFILE=1024
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
WorkingDirectory=/var/gonic/
|
||||
ExecStart=/var/gonic/gonic -config-path /var/gonic/config
|
||||
|
||||
# make sure log directory exists and owned by syslog
|
||||
PermissionsStartOnly=true
|
||||
ExecStartPre=/bin/mkdir -p /var/log/gonic
|
||||
ExecStartPre=/bin/chown syslog:adm /var/log/gonic
|
||||
ExecStartPre=/bin/chmod 755 /var/log/gonic
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=sleepservice
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user