From 24e4ff178ef7a7c274daa7031ddd6b4fe12275ee Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 10 Dec 2020 12:34:18 +0100 Subject: [PATCH] Add PHP variable to cron --- conf/cron | 2 +- scripts/install | 2 +- scripts/upgrade | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/cron b/conf/cron index 8d0c5c3..8ac1ec4 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ MAILTO="admin" -5 * * * * __USER__ /usr/bin/php__PHPVERSION__ __FINALPATH__/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null +5 * * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null diff --git a/scripts/install b/scripts/install index c4061ad..e32c5e8 100755 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,7 @@ ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" ynh_script_progression --message="Setuping a cron..." ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/cron" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/cron" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../conf/cron" ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="../conf/cron" diff --git a/scripts/upgrade b/scripts/upgrade index 6f892f9..9e5186b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,10 +123,11 @@ ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" #================================================= ynh_script_progression --message="Setuping a cron..." -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/cron" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/cron" +ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/cron" +ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/cron" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/cron" ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="../conf/cron" +ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="../conf/cron" cp -f ../conf/cron /etc/cron.d/$app #=================================================