distutils install: fixed plugin import and log file path
This commit is contained in:
parent
ff07dfb2b8
commit
e589cf370b
3 changed files with 10 additions and 3 deletions
0
frontends/src/__init__.py
Normal file
0
frontends/src/__init__.py
Normal file
|
|
@ -3,6 +3,7 @@
|
|||
NAME='sat'
|
||||
|
||||
PID_FILE="/tmp/$NAME.pid"
|
||||
LOG_FILE=~/".$NAME/$NAME.log"
|
||||
DAEMON="n"
|
||||
MAIN_OPTIONS="-${DAEMON}oy"
|
||||
TAP_PATH="./"
|
||||
|
|
@ -10,7 +11,11 @@ TAP_FILE="$NAME.tac"
|
|||
|
||||
#Don't change the next line
|
||||
AUTO_OPTIONS=""
|
||||
ADDITIONAL_OPTIONS="--pidfile $PID_FILE $AUTO_OPTIONS"
|
||||
ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS"
|
||||
|
||||
log_dir=`dirname "$LOG_FILE"`
|
||||
if [ ! -d $log_dir ] ; then
|
||||
mkdir $log_dir
|
||||
fi
|
||||
|
||||
echo "autogenere == >" twistd $MAIN_OPTIONS $TAP_PATH$TAP_FILE $ADDITIONAL_OPTIONS
|
||||
twistd $MAIN_OPTIONS $TAP_PATH$TAP_FILE $ADDITIONAL_OPTIONS
|
||||
|
|
|
|||
|
|
@ -369,7 +369,9 @@ class SAT(service.Service):
|
|||
def _import_plugins(self):
|
||||
"""Import all plugins found in plugins directory"""
|
||||
#TODO: manage dependencies
|
||||
plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob ("plugins/plugin*.py"))]
|
||||
import sat.plugins
|
||||
plugins_path = os.path.dirname(sat.plugins.__file__)
|
||||
plug_lst = [os.path.splitext(plugin)[0] for plugin in map(os.path.basename,glob (os.path.join(plugins_path,"plugin*.py")))]
|
||||
|
||||
for plug in plug_lst:
|
||||
plug_path = 'sat.plugins.'+plug
|
||||
|
|
|
|||
Loading…
Reference in a new issue