comparison src/sat.sh @ 1122:9ae01ccf89c1

core: sat bakcend is now a twisted plugin (no more .tac file)
author Goffi <goffi@goffi.org>
date Sun, 24 Aug 2014 18:44:17 +0200
parents b56374a1f6d6
children 02c26e6630d0
comparison
equal deleted inserted replaced
1121:64ff259d3cbb 1122:9ae01ccf89c1
43 sys.exit() 43 sys.exit()
44 44
45 env=[] 45 env=[]
46 env.append("PID_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'pid_dir')),'')) 46 env.append("PID_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'pid_dir')),''))
47 env.append("LOG_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'log_dir')),'')) 47 env.append("LOG_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'log_dir')),''))
48
49 env.append("APP_NAME='%s'" % C.APP_NAME) 48 env.append("APP_NAME='%s'" % C.APP_NAME)
50 env.append("APP_NAME_FILE='%s'" % C.APP_NAME_FILE) 49 env.append("APP_NAME_FILE='%s'" % C.APP_NAME_FILE)
51 print ";".join(env) 50 print ";".join(env)
52 PYTHONEND 51 PYTHONEND
53 ` 52 `
67 echo "Launching $APP_NAME in foreground mode" 66 echo "Launching $APP_NAME in foreground mode"
68 DAEMON="n" 67 DAEMON="n"
69 fi 68 fi
70 fi 69 fi
71 70
72 MAIN_OPTIONS="-${DAEMON}oy" 71 MAIN_OPTIONS="-${DAEMON}o"
73 TAP_PATH="./"
74 TAP_FILE="$APP_NAME_FILE.tac"
75 72
76 #Don't change the next line 73 #Don't change the next lines
77 AUTO_OPTIONS="" 74 AUTO_OPTIONS=""
78 ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS $DEBUG" 75 ADDITIONAL_OPTIONS="--pidfile $PID_FILE --logfile $LOG_FILE $AUTO_OPTIONS $DEBUG"
79 76
80 log_dir=`dirname "$LOG_FILE"` 77 log_dir=`dirname "$LOG_FILE"`
81 if [ ! -d $log_dir ] ; then 78 if [ ! -d $log_dir ] ; then
82 mkdir $log_dir 79 mkdir $log_dir
83 fi 80 fi
84 81
85 twistd $MAIN_OPTIONS $TAP_PATH$TAP_FILE $ADDITIONAL_OPTIONS 82 twistd $MAIN_OPTIONS $ADDITIONAL_OPTIONS $APP_NAME_FILE