From: Sam Saffron Date: Tue, 25 Aug 2020 07:20:51 +0000 (+1000) Subject: FIX: Always remove pids on boot X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ca39457ffc10c8eedc9843fe541a7265cc4e888c;p=discourse_docker.git FIX: Always remove pids on boot Previously if unicorn stopped abruptly we could have a situation where pids were left around This could lead to Sidekiq not booting This will ensure that on boot our state is clean --- diff --git a/templates/web.template.yml b/templates/web.template.yml index fc49180..6dd9f69 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -288,7 +288,12 @@ run: rm -rf /shared/tmp/{backups,restores} mkdir -p /shared/tmp/{backups,restores} chown -R discourse:www-data /shared/tmp/{backups,restores} - + - file: + path: /etc/runit/1.d/01-cleanup-web-pids + chmod: +x + contents: | + #!/bin/bash + /bin/rm -f /var/www/discourse/tmp/pids/*.pid # change login directory to Discourse home - file: path: /root/.bash_profile