j-c-m / ubnt-letsencrypt

Let's Encrypt setup instructions for Ubiquiti EdgeRouter
472 stars 68 forks source link

PID file not reliable #29

Closed wcrosbie closed 4 years ago

wcrosbie commented 4 years ago

Thanks for the script and associated process. I'm using and EdgeRouter X.

I've learned that the lighttpd.pid file either at /var/run or /run may not have valid content. This causes the script to hang.

I did a quick tweak to use pidof "lighttpd" to kill the running GUI.

NeeksGit commented 4 years ago

also experiencing same issue. However the content of the current script seems to return the proper process of lightpd

$ cat /var/run/lighttpd.pid
> 4064
$ ps ax | grep light 
> 4064 ?        S      0:04 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

unsure why it is still hanging and breaks the gui

j-c-m commented 4 years ago

It seems that lighttpd when signaled for a graceful restart, which is what the script is doing, sometimes just doesn't ever exit.

I have made updates (04adcf8d20386e804fb7166a8e85ad03bce5b13e) to use a more forceful SIGTERM stop.