Commit 5b993994 authored by echel0n's avatar echel0n

Modified startup scripts to use python3 instead of python2.7

parent 08f3d6aa
......@@ -35,7 +35,7 @@ fi
## SR_HOME= #$APP_PATH, the location of SiCKRAGE.py, the default is /opt/sickrage
## SR_DATA= #$DATA_DIR, the location of sickrage.db, cache, logs, the default is /opt/sickrage
## SR_PIDFILE= #$PID_FILE, the location of sickrage.pid, the default is /var/run/sickrage/sickrage.pid
## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python2.7
## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python3
## SR_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickrage, i.e. " --config=/home/sickrage/config.ini"
## SSD_OPTS= #$EXTRA_SSD_OPTS, extra start-stop-daemon option like " --group=users"
##
......@@ -66,7 +66,7 @@ DATA_DIR=${SR_DATA-/opt/sickrage}
PID_FILE=${SR_PIDFILE-/var/run/sickrage/sickrage.pid}
# path to python bin
DAEMON=${PYTHON_BIN-/usr/bin/python2.7}
DAEMON=${PYTHON_BIN-/usr/bin/python3}
# Extra daemon option like: SR_OPTS=" --config=/home/sickrage/config.ini"
EXTRA_DAEMON_OPTS=${SR_OPTS-}
......
......@@ -28,7 +28,7 @@ homedir=${SR_HOME-/opt/sickrage}
datadir=${SR_DATA-/opt/sickrage}
pidfile=${SR_PIDFILE-/var/run/sickrage/sickrage.pid}
nice=${SR_NICE-}
python_bin=${PYTHON_BIN-/usr/bin/python2.7}
python_bin=${PYTHON_BIN-/usr/bin/python3}
##
pidpath=`dirname ${pidfile}`
......
......@@ -40,7 +40,7 @@ status_cmd="sickrage_status"
pidfile="/var/run/sickrage/sickrage.pid"
command="/usr/local/bin/python2.7 ${sickrage_dir}/SiCKRAGE.py -q --datadir ${sickrage_datadir} --nolaunch"
command="/usr/local/bin/python3 ${sickrage_dir}/SiCKRAGE.py -q --datadir ${sickrage_datadir} --nolaunch"
start_cmd="/usr/sbin/daemon -p ${pidfile} -u ${sickrage_user} -r -f $command"
start_precmd="sickrage_prestart"
......
......@@ -12,7 +12,7 @@
# SICKRAGE_USER=<user you want sickrage to run under>
# SICKRAGE_GROUP=<group you want sickrage to run under>
# SICKRAGE_DIR=<path to SiCKRAGE.py>
# PATH_TO_PYTHON_2=/usr/bin/python2.7
# PATH_TO_PYTHON_3=/usr/bin/python3
# SICKRAGE_DATADIR=<directory that contains sickrage.db file>
# SICKRAGE_CONFDIR=<directory that contains Sickrage's config.ini file>
#
......@@ -49,7 +49,7 @@ start() {
--name sickrage \
--background \
--pidfile $(get_pidfile) \
--exec ${PATH_TO_PYTHON_2} \
--exec ${PATH_TO_PYTHON_3} \
-- \
${SICKRAGE_DIR}/SiCKRAGE.py \
-d \
......
......@@ -24,21 +24,21 @@
### 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
# ExecStart=/usr/bin/python3 /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
# ExecStart=/usr/bin/python3 /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
# ExecStart=/usr/bin/python3 /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}
# ExecStart=/usr/bin/python3 /opt/sickrage/SiCKRAGE.py -q --nolaunch --datadir=${SR_DATA}
### Configuration
......@@ -52,7 +52,7 @@ Group=sickrage
Type=forking
GuessMainPID=no
ExecStart=/usr/bin/python2.7 /opt/sickrage/SiCKRAGE.py -q --daemon --nolaunch --datadir=/opt/sickrage
ExecStart=/usr/bin/python3 /opt/sickrage/SiCKRAGE.py -q --daemon --nolaunch --datadir=/opt/sickrage
Restart=on-failure
TimeoutStopSec=300
......
......@@ -35,7 +35,7 @@ DESC=SickRage
## SR_HOME= #$APP_PATH, the location of SiCKRAGE.py, the default is /opt/sickrage
## SR_DATA= #$DATA_DIR, the location of sickrage.db, cache, logs, the default is /opt/sickrage
## SR_PIDFILE= #$PID_FILE, the location of sickrage.pid, the default is /var/run/sickrage/sickrage.pid
## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python2.7
## PYTHON_BIN= #$DAEMON, the location of the python binary, the default is /usr/bin/python3
## SR_OPTS= #$EXTRA_DAEMON_OPTS, extra cli option for sickrage, i.e. " --config=/home/sickrage/config.ini"
## SSD_OPTS= #$EXTRA_SSD_OPTS, extra start-stop-daemon option like " --group=users"
##
......@@ -57,7 +57,7 @@ DATA_DIR=${SR_DATA-/opt/sickrage}
PID_FILE=${SR_PIDFILE-/var/run/sickrage/sickrage.pid}
# path to python bin
DAEMON=${PYTHON_BIN-/usr/bin/python2.7}
DAEMON=${PYTHON_BIN-/usr/bin/python3}
# Extra daemon option like: SR_OPTS=" --config=/home/sickrage/config.ini"
EXTRA_DAEMON_OPTS=${SR_OPTS-}
......
......@@ -191,11 +191,11 @@
<ul>
<li>
${_('For Windows:')}
<small class="text-muted">C:\Python27\pythonw.exe C:\Script\test.py</small>
<small class="text-muted">C:\Python37\pythonw.exe C:\Script\test.py</small>
</li>
<li>
${_('For Linux:')}
<small class="text-muted">python /Script/test.py</small>
<small class="text-muted">python3 /Script/test.py</small>
</li>
</ul>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment