Skip to content

Commit e806e26

Browse files
author
Patrick Vos
committed
Fix init.systemd script
1 parent 3b17a8c commit e806e26

File tree

1 file changed

+49
-4
lines changed

1 file changed

+49
-4
lines changed

init.systemd

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,57 @@
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+
145
[Unit]
246
Description=SickBeard Daemon
347

448
[Service]
5-
EnvironmentFile=-/etc/conf.d/sickbeard
6-
User=${SB_USER-sickbeard}
49+
User=sickbeard
50+
Group=sickbeard
51+
752
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
1055

1156
[Install]
1257
WantedBy=multi-user.target

0 commit comments

Comments
 (0)