From 0f0d0da0c09cdcf60dbbdd9fb2f3c815433ca921 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 19:28:13 +0200 Subject: [PATCH] Add PHP version to cron --- scripts/install | 1 + scripts/restore | 2 +- scripts/upgrade | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 23d0d4f..f4962a5 100755 --- a/scripts/install +++ b/scripts/install @@ -139,6 +139,7 @@ ynh_script_progression --message="Configuring the cron file..." --weight=2 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app +ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app #================================================= # GENERIC FINALISATION diff --git a/scripts/restore b/scripts/restore index f2f7cba..f6b3e16 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,7 +64,7 @@ ynh_system_user_create --username=$app # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE THE CRON FILE diff --git a/scripts/upgrade b/scripts/upgrade index bd3a365..b45c265 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -227,6 +227,7 @@ ynh_script_progression --message="Configuring the cron file..." --weight=1 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app +ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app #================================================= # GENERIC FINALISATION