joar/mediagoblin-init-scripts

Sleep on restart

Opened this issue · 1 comments

You should add sleep 1 between the stop and start on the restart command as done on this fork.

It is a workaround for the fact that the celery-worker process sometimes take too long to stop and when the new process tries to start, the pid file is already there. There are other ways to solve this issue, but since a link to this repository is on the deploy recipe, you should at least patch it.

Actually the script should handle this the "proper" way as the Debian guidelines says, but whatever.

Yeah, it should be patched. But only for legacy reasons since the future lies in systemd unit files now that both Debian and Ubuntu, along with the RedHat world since long, has moved to it.