From ca39457ffc10c8eedc9843fe541a7265cc4e888c Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 25 Aug 2020 17:20:51 +1000 Subject: [PATCH] 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 --- templates/web.template.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.25.1