Permalink
6bd2f45 Jan 14, 2016
@miigotu @Carlosgrr
executable file 58 lines (48 sloc) 2.05 KB
# Sickrage systemd service unit file
#
# Configuration Notes
#
# - Option names (e.g. ExecStart=, Type=) are case-sensitive)
#
# - Adjust User= and Group= to the user/group you want Sickrage to run as.
#
# - Optional adjust EnvironmentFile= path to configuration file
# Can ONLY be used for configuring extra options used in ExecStart.
# Putting a minus (-) in front of file means no error warning if the file doesn't exist
#
# - Adjust ExecStart= to point to your python and SickRage executables.
# The FIRST token of the command line must be an ABSOLUTE FILE NAME,
# then followed by arguments for the process.
# If no --datadir is given, data is stored in same dir as SiCKRAGE.py
# Arguments can also be set in EnvironmentFile (except python)
#
# - WantedBy= specifies which target (i.e. runlevel) to start Sickrage for.
# multi-user.target equates to runlevel 3 (multi-user text mode)
# graphical.target equates to runlevel 5 (multi-user X11 graphical mode)
#
### Example Using SickRage as daemon with pid file
# Type=forking
# PIDFile=/var/run/sickrage/sickrage.pid
# ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --daemon --nolaunch --pidfile=/var/run/sickrage/sickrage.pid --datadir=/opt/sickrage
## Example Using SickRage as daemon without pid file
# Type=forking
# GuessMainPID=no
# ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --daemon --nolaunch --datadir=/opt/sickrage
### Example Using simple
# Type=simple
# ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --nolaunch
### Example Using simple with EnvironmentFile where SR_DATA=/home/sickrage/.sickrage in /etc/sickrage.conf
# Type=simple
# EnvironmentFile=/etc/sickrage.conf
# ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --nolaunch --datadir=${SR_DATA}
### Configuration
[Unit]
Description=SickRage Daemon
[Service]
User=sickrage
Group=sickrage
Type=forking
GuessMainPID=no
ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --daemon --nolaunch --datadir=/opt/sickrage
[Install]
WantedBy=multi-user.target