-
Notifications
You must be signed in to change notification settings - Fork 1
/
twonky.service
29 lines (21 loc) · 877 Bytes
/
twonky.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[Unit]
Description=Twonky UPnP Media Server
After=syslog.target network.target
[Service]
Type=simple
User=twonky
Group=twonky
# create ./twonky in the temporary /run filesystem, for twonky to write the .pid file to
RuntimeDirectory=twonky
PIDFile=/run/twonky/mediaserver.pid
# Twonky tries to create dbdir in the WorkingDirectory unless appdata is specified on the command line
WorkingDirectory=/opt/twonky
ExecStart=/opt/twonky/twonkystarter -mspid /run/twonky/mediaserver.pid -logfile /var/log/twonky/twonky.log -inifile /etc/twonky/twonkyserver.ini -appdata /var/opt/twonky
ExecStop=kill -s TERM $MAINPID
ExecStopPost=-killall -s TERM twonkystarter
ExecStopPost=-killall -s TERM twonky
# Twonky doesn't appear to support reload, and stops with no logged error when this is called
#ExecReload=kill -s HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target