Mercurial > libervia-backend
comparison bin/sat @ 3053:8b36e5c3f28f
misc: don't import memory in launch script:
launch script was importing a method from memory (fixLocalDir), but memory is importing
twisted.internet.reactor which can result to a ReactorAlreadyInstalledError.
This patch fixes it by moving fixLocalDir to tools/config.
The launch script is now using /usr/bin/env.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 08 Oct 2019 12:10:26 +0200 |
parents | ab2696e34d29 |
children | 0b6d56a8f7e3 |
comparison
equal
deleted
inserted
replaced
3052:60a63723ecea | 3053:8b36e5c3f28f |
---|---|
24 echo "$2 is probably not running (PID file doesn't exist)" | 24 echo "$2 is probably not running (PID file doesn't exist)" |
25 fi | 25 fi |
26 } | 26 } |
27 | 27 |
28 #We use python to parse config files | 28 #We use python to parse config files |
29 eval `"$PYTHON" << PYTHONEND | 29 eval `/usr/bin/env "$PYTHON" << PYTHONEND |
30 from sat.core.constants import Const as C | 30 from sat.core.constants import Const as C |
31 from sat.memory.memory import fixLocalDir | 31 from sat.tools.config import fixLocalDir |
32 from configparser import ConfigParser | 32 from configparser import ConfigParser |
33 from os.path import expanduser, join | 33 from os.path import expanduser, join |
34 import sys | 34 import sys |
35 | 35 |
36 fixLocalDir() # XXX: tmp update code, will be removed in the future | 36 fixLocalDir() # XXX: tmp update code, will be removed in the future |
98 log_dir=`dirname "$LOG_FILE"` | 98 log_dir=`dirname "$LOG_FILE"` |
99 if [ ! -d $log_dir ] ; then | 99 if [ ! -d $log_dir ] ; then |
100 mkdir $log_dir | 100 mkdir $log_dir |
101 fi | 101 fi |
102 | 102 |
103 exec $PYTHON $TWISTD $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE | 103 exec /usr/bin/env $PYTHON $TWISTD $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE |