Private GIT

Skip to content
Snippets Groups Projects
Commit ae5ec35f authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Upstart expects you to start things in the foreground. Simplify script,...

Upstart expects you to start things in the foreground. Simplify script, replace sickbeard with sickrage to avoid conflicts. Fixes restart
parent b6c028c9
No related branches found
No related tags found
No related merge requests found
# SickBeard # SickRage
# #
# Configuration Notes # Configuration Notes
# #
# - Adjust setuid and setgid to the user/group you want Sickbeard to run as. # - Adjust setuid and setgid to the user/group you want SickRage to run as.
# - For all other settings edit /etc/default/sickbeard instead of this file. # - For all other settings edit /etc/default/sickrage instead of this file.
# The following settings can be set in /etc/default/sickbeard and are used to run Sickbeard. #
# SB_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickbeard # The following settings can be set in /etc/default/sickrage and are used to run SickRage.
# SB_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickbeard # SR_HOME= #$APP_PATH, the location of SickBeard.py, the default is /opt/sickrage
# PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python # SR_DATA= #$DATA_DIR, the location of sickbeard.db, cache, logs, the default is /opt/sickrage
# SB_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickbeard, i.e. " --config=/home/sickbeard/config.ini" # SR_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickrage, i.e. " --config=/home/sickrage/config.ini"
description "SickBeard Daemon" description "SickRage Daemon"
start on runlevel [2345] start on runlevel [2345]
stop on runlevel [!2345] stop on runlevel [!2345]
# give time to shutdown
kill timeout 30 kill timeout 30
setuid sickbeard setuid sickrage
setgid sickbeard setgid sickrage
respawn respawn
respawn limit 10 5 respawn limit 10 5
expect daemon
script script
if [ -f /etc/default/sickbeard ]; then if [ -f /etc/default/sickrage ]; then
. /etc/default/sickbeard . /etc/default/sickrage
else else
echo "/etc/default/sickbeard not found using default settings."; echo "/etc/default/sickrage not found using default settings.";
fi fi
# Path to app SB_HOME=path_to_app_SickBeard.py
APP_PATH=${SB_HOME-/opt/sickbeard}
# Data directory where sickbeard.db, cache and logs are stored
DATA_DIR=${SB_DATA-/opt/sickbeard}
# path to python bin
DAEMON=${PYTHON_BIN-/usr/bin/python}
# Extra daemon option like: SB_OPTS=" --config=/home/sickbeard/config.ini" [ -z $SR_HOME ] && echo "I can't start SickRage if I don't know where it is"
EXTRA_DAEMON_OPTS=${SB_OPTS-}
DAEMON_OPTS=" SickBeard.py -q --daemon --nolaunch --datadir=${DATA_DIR} ${EXTRA_DAEMON_OPTS}" exec ${SR_HOME}/SickBeard.py -q --nolaunch --datadir=${SR_DATA-SR_HOME} ${SR_OPTS-}
chdir $APP_PATH
exec $DAEMON $DAEMON_OPTS
end script end script
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment