From 278b409e440eb47e5dd554053b96ffc2b4b9cc33 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 27 Aug 2017 12:40:53 +0100 Subject: [PATCH] Workaround for nginx failures when resetting tripwire --- src/freedombone-controlpanel | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 6e87f0b0..8be2d32a 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1352,6 +1352,14 @@ function reset_tripwire { ' | reset-tripwire echo '' + + # Sometimes nginx fails to restart if matrix is installed + # Restart matrix first + if [ -d /etc/matrix ]; then + systemctl restart matrix + systemctl restart nginx + fi + if [ -f /var/lib/tripwire/${HOSTNAME}.twd ]; then show_tripwire_verification_code echo $'Tripwire is now reset. Take a note of the above hash, or record'