diff --git a/frontends/src/__init__.py b/frontends/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/sat.sh b/src/sat.sh index 79435d37..7f0ba901 100755 --- a/src/sat.sh +++ b/src/sat.sh @@ -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 diff --git a/src/sat.tac b/src/sat.tac index 6563a965..f1a5abc7 100644 --- a/src/sat.tac +++ b/src/sat.tac @@ -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