I am trying to configure uWSGI with Upstart.
I created the file /etc/init/uwsgi-flask.conf
:
description "uwsgi for flask"
start on runlevel [2345]
stop on runlevel [06]
exec /appdir/virtualenvdir/bin/uwsgi /appdir/virtualenvdir/uwsgi.ini --die-on-term
On reboot, it starts up correctly, but I am not able to stop the service.
If I type on shell initctl stop uwsgi-flask
, it gives:
initctl: Unknown instance:
anyone has any idea?
You probably have daemonize=some/log/file/path
in your ini file. That will make the process exit with a "normal" exit code, so Upstart will figure that you wanted the job stopped and terminate the job.
Remove daemonize and upstart will track the process in the foreground.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With