|
| 1 | +# Sickbeard systemd service unit file |
| 2 | +# |
| 3 | +# Configuration Notes |
| 4 | +# |
| 5 | +# - Option names (e.g. ExecStart=, Type=) are case-sensitive) |
| 6 | +# |
| 7 | +# - Adjust User= and Group= to the user/group you want Sickbeard to run as. |
| 8 | +# |
| 9 | +# - Optional adjust EnvironmentFile= path to configuration file |
| 10 | +# Can ONLY be used for configuring extra options used in ExecStart. |
| 11 | +# Putting a minus (-) in front of file means no error warning if the file doesn't exist |
| 12 | +# |
| 13 | +# - Adjust ExecStart= to point to your python and SickBeard executables. |
| 14 | +# The FIRST token of the command line must be an ABSOLUTE FILE NAME, |
| 15 | +# then followed by arguments for the process. |
| 16 | +# If no --datadir is given, data is stored in same dir as SickBeard.py |
| 17 | +# Arguments can also be set in EnvironmentFile (except python) |
| 18 | +# |
| 19 | +# - WantedBy= specifies which target (i.e. runlevel) to start Sickbeard for. |
| 20 | +# multi-user.target equates to runlevel 3 (multi-user text mode) |
| 21 | +# graphical.target equates to runlevel 5 (multi-user X11 graphical mode) |
| 22 | +# |
| 23 | + |
| 24 | +### Example Using SickBeard as daemon with pid file |
| 25 | +# Type=forking |
| 26 | +# PIDFile=/var/run/sickbeard/sickbeard.pid |
| 27 | +# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --pidfile=/var/run/sickbeard/sickbeard.pid --datadir=/opt/sickbeard |
| 28 | + |
| 29 | +## Example Using SickBeard as daemon without pid file |
| 30 | +# Type=forking |
| 31 | +# GuessMainPID=no |
| 32 | +# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickbeard |
| 33 | + |
| 34 | +### Example Using simple |
| 35 | +# Type=simple |
| 36 | +# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --nolaunch |
| 37 | + |
| 38 | +### Example Using simple with EnvironmentFile where SB_DATA=/home/sickbeard/.sickbeard in /etc/sickbeard.conf |
| 39 | +# Type=simple |
| 40 | +# EnvironmentFile=/etc/sickbeard.conf |
| 41 | +# ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --nolaunch --datadir=${SB_DATA} |
| 42 | + |
| 43 | +### Configuration |
| 44 | + |
1 | 45 | [Unit] |
2 | 46 | Description=SickBeard Daemon |
3 | 47 |
|
4 | 48 | [Service] |
5 | | -EnvironmentFile=-/etc/conf.d/sickbeard |
6 | | -User=${SB_USER-sickbeard} |
| 49 | +User=sickbeard |
| 50 | +Group=sickbeard |
| 51 | + |
7 | 52 | Type=forking |
8 | | -PIDFile=${SB_PIDFILE-/var/run/sickbeard/sickbeard.pid} |
9 | | -ExecStart=${SB_PYTHON-/usr/bin/python2} ${SB_BIN-/opt/sickbeard/SickBeard.py} --config %h/.sickbeard/config.ini --datadir %h/.sickbeard ${SB_OPTS-} |
| 53 | +GuessMainPID=no |
| 54 | +ExecStart=/usr/bin/python /opt/sickbeard/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickbeard |
10 | 55 |
|
11 | 56 | [Install] |
12 | 57 | WantedBy=multi-user.target |
0 commit comments