[pkg-uWSGI-devel] Bug#934731: Still an issue in Buster
    Matt Hoskins 
    matt at nipltd.com
       
    Wed Sep 30 13:52:33 BST 2020
    
    
  
I've just hit the same issue - I was wondering why I couldn't shut down 
or restart the service!
In looking at how to fix it I see that /lib/init/init-d-script will call 
a do_start_prepare function if defined, so I've edited 
/etc/init.d/uwsgi-emperor to add this towards the end to pre-create the 
pidfile (as uwsgi will just write to it if it exists):
do_start_prepare() {
         # Create with correct permissions in advance as uwsgi with 
--daemonize creates it world write otherwise
         touch "$PIDFILE"
}
That seems to do the job (dunno if it's worth/problematic to set umask 
explicitly in the init.d script as well to ensure that pidfile is 
correctly created).
    
    
More information about the pkg-uWSGI-devel
mailing list