[SOLVED] Systemd/systemctl service file for serviio
If this helps somebody else, here's a simple file that allows serviio start/stop on systemd-compatible systems.
I am using Fedora 16. My serviio distribution is installed under "/opt/serviio/serviio-0.6.16". I have create a user "serviio" and a group "serviio", and all the files under /opt/serviio are owned by this user and group.
To use this:
- put the content below in "/lib/systemd/system/serviio.service"
#-- Start of serviio.service file --
# Systemd unit file for serviio
#
[Unit]
Description=Serviio DLNA/uPNP server
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/sbin/runuser -l serviio -c "/opt/serviio/serviio-0.6.1/bin/serviio.sh &"
ExecStop=/sbin/runuser -l serviio -c "/opt/serviio/serviio-0.6.1/bin/serviio.sh -stop &"
[Install]
WantedBy=multi-user.target
#-- End of serviio.service file --
- enable the serviio service: "systemctl enable serviio.service". it will automatically start after reboots.
- To manually stop the service: "systemctl stop serviio.service"
- To manually start the service: "systemctl start serviio.service"
- To check status: "systemctl status serviio.service"
Hope this helps!
Shash