2016-02-15 05:30:43 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Log rotation
|
2018-03-09 21:40:58 -05:00
|
|
|
DIR=${HOME}/proxmaster
|
|
|
|
LOG_FILE="${DIR}/log/proxmaster.log"
|
2016-02-15 05:30:43 -05:00
|
|
|
|
2018-03-09 21:40:58 -05:00
|
|
|
mkdir -p $DIR/log
|
2016-02-15 05:30:43 -05:00
|
|
|
|
|
|
|
TIME=`date -u +%s`
|
|
|
|
|
|
|
|
if [ -e $LOG_FILE ] ; then
|
|
|
|
mv ${LOG_FILE} ${LOG_FILE}.${TIME} && touch ${LOG_FILE}
|
|
|
|
else
|
|
|
|
touch ${LOG_FILE}
|
|
|
|
fi
|
|
|
|
|
|
|
|
#startuwsgi instance
|
2018-03-09 21:40:58 -05:00
|
|
|
uwsgi --logdate --ini config.ini
|