Daniele B
Daniele B

Reputation: 20442

managing uWSGI with Upstart

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?

Upvotes: 7

Views: 1933

Answers (1)

SpamapS
SpamapS

Reputation: 1115

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.

Upvotes: 8

Related Questions