Workaround for nginx failures when resetting tripwire

This commit is contained in:
Bob Mottram 2017-08-27 12:40:53 +01:00
parent 6acbc2118b
commit 278b409e44
1 changed files with 8 additions and 0 deletions

View File

@ -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'