core (sat.sh): force python 2 to launch twistd, and avoid launching wrong version if twistd is installed for python 3 too

This commit is contained in:
Goffi 2017-11-17 10:59:59 +01:00
commit b762596721

View file

@ -3,6 +3,7 @@
DEBUG=""
DAEMON=""
PYTHON="python2"
TWISTD="$(which twistd)"
kill_process() {
# $1 is the file containing the PID to kill, $2 is the process name
@ -103,4 +104,4 @@ if [ ! -d $log_dir ] ; then
mkdir $log_dir
fi
exec twistd $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE
exec $PYTHON $TWISTD $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE