From b98111b4e1511146276727c69f86bae881a9c6ec Mon Sep 17 00:00:00 2001 From: David Duque Date: Mon, 29 Jun 2020 09:13:50 +0100 Subject: [PATCH] Fix unassigned php version --- management/backup.py | 4 ++-- management/daily_tasks.sh | 6 +++--- setup/functions.sh | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/management/backup.py b/management/backup.py index 1bec8638..90a64588 100755 --- a/management/backup.py +++ b/management/backup.py @@ -247,7 +247,7 @@ def perform_backup(full_backup): if quit: sys.exit(code) - service_command("php7.3-fpm", "stop", quit=True) + service_command("php!!___PHPVER___!!-fpm", "stop", quit=True) service_command("postfix", "stop", quit=True) service_command("dovecot", "stop", quit=True) @@ -281,7 +281,7 @@ def perform_backup(full_backup): # Start services again. service_command("dovecot", "start", quit=False) service_command("postfix", "start", quit=False) - service_command("php7.3-fpm", "start", quit=False) + service_command("php!!___PHPVER___!!-fpm", "start", quit=False) # Remove old backups. This deletes all backup data no longer needed # from more than 3 days ago. diff --git a/management/daily_tasks.sh b/management/daily_tasks.sh index db496399..dee8b602 100755 --- a/management/daily_tasks.sh +++ b/management/daily_tasks.sh @@ -12,14 +12,14 @@ export LC_TYPE=en_US.UTF-8 # On Mondays, i.e. once a week, send the administrator a report of total emails # sent and received so the admin might notice server abuse. if [ `date "+%u"` -eq 1 ]; then - management/mail_log.py -t week | management/email_administrator.py "Mail-in-a-Box Usage Report" + management/mail_log.py -t week | management/email_administrator.py "Mail-in-a-Box Usage Report" fi # Take a backup. management/backup.py 2>&1 | management/email_administrator.py "Backup Status" # Provision any new certificates for new domains or domains with expiring certificates. -management/ssl_certificates.py -q 2>&1 | management/email_administrator.py "TLS Certificate Provisioning Result" +management/ssl_certificates.py -q 2>&1 | management/email_administrator.py "TLS Certificate Provisioning Result" # Run status checks and email the administrator if anything changed. -management/status_checks.py --show-changes 2>&1 | management/email_administrator.py "Status Checks Change Notice" +management/status_checks.py --show-changes 2>&1 | management/email_administrator.py "Status Checks Change Notice" diff --git a/setup/functions.sh b/setup/functions.sh index 3cfe9e1e..7097ad64 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -232,3 +232,4 @@ elif [ "$OS" == "Ubuntu 20.04 LTS" ]; then fi sed -i "s|!!___PHPVER___!!|${PHP_VERSION}|g" conf/nginx-top.conf +sed -i "s|!!___PHPVER___!!|${PHP_VERSION}|g" management/backup.py