start 510 B

12345678910111213
  1. #!/bin/sh
  2. pidfile=/dev/shm/xwbphotovote.pid
  3. host=0.0.0.0
  4. port=8701
  5. basedir=/home/wwwcgi/swyzxwb_photovote/
  6. if [ ! -f "$pidfile" ]; then
  7. cd $basedir
  8. python2.7 manage.py runfcgi host=$host port=$port pidfile=$pidfile outlog=${basedir}out.log errlog=${basedir}err.log
  9. echo -e "Starting swyzxwb_photovote CGI..............[\033[40;32mOK\033[0m]"
  10. else
  11. echo -e "Starting swyzxwb_photovote CGI..............[\033[40;31mFAILURE\033[0m]"
  12. echo "CGI Maybe Already Running... Please Try to Use Restart Operation."
  13. fi