Yann Malet  committed 9554e86

Fix the upstart script

  • Participants
  • Parent commits 631460b

Comments (0)

Files changed (1)

 description     "UWSGI Emperor Server"
 author          "Yann Malet <>"
-start on startup
+start on runlevel [2345]
 stop on runlevel [016]
 env EMPEROR_HOME=/opt/webapps/emperor-test
 # time to wait between sending TERM and KILL signals
 kill timeout 6
-# TODO: This does not work for some reason
-# The pid is not correct 
-expect daemon
-#expect fork
-# This directive is deprecated
-#pid file $EMPEROR_HOME/
 pre-start script
     #Sanity checks
     chdir $EMPEROR_HOME
     . ve/bin/activate
-    exec uwsgi --emperor "vassal-sites/*/*.xml"  --logto $EMPEROR_HOME/uwsgi.log --fastrouter :3031 --fastrouter-use-cache --cache 100 --socket :3032 --gid $UWSGI_GROUP --uid $UWSGI_USER
+    exec uwsgi --emperor "vassal-sites/*/*.xml"  --logto $EMPEROR_HOME/uwsgi.log --pidfile $EMPEROR_HOME/ --fastrouter :3031 --fastrouter-use-cache --cache 100 --socket :3032 --gid $UWSGI_GROUP --uid $UWSGI_USER
 end script
 post-stop script