From 45ef8a2aa3ec4616815c1a7e58946feaf7c1b9a4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 11 Dec 2020 17:31:47 +0100 Subject: [PATCH] Fix cron --- conf/{matomo.cron => cron} | 0 scripts/change_url | 2 +- scripts/install | 17 +++++++---------- scripts/upgrade | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) rename conf/{matomo.cron => cron} (100%) diff --git a/conf/matomo.cron b/conf/cron similarity index 100% rename from conf/matomo.cron rename to conf/cron diff --git a/scripts/change_url b/scripts/change_url index 380353e..253d54f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -97,7 +97,7 @@ fi #================================================= ynh_script_progression --message="Setuping a cron..." -cp ../conf/matomo.cron /etc/cron.d/$app +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" diff --git a/scripts/install b/scripts/install index b228530..147f985 100755 --- a/scripts/install +++ b/scripts/install @@ -106,18 +106,15 @@ git clone https://github.com/matomo-org/matomo-icons.git "$final_path/plugins/Mo #================================================= # SETUP A CRON #================================================= -# ynh_script_progression --message="Setuping a cron..." +ynh_script_progression --message="Setuping a cron..." -# cron_path="/etc/cron.d/$app" -# cp -a ../conf/matomo.cron "$cron_path" -# chown root: "$cron_path" -# chmod 644 "$cron_path" +cp ../conf/cron /etc/cron.d/$app -# ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$cron_path" -# ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$cron_path" -# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$cron_path" -# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$cron_path" -# ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="$cron_path" +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="__DOMAIN__" --replace_string="$domain" --target_file="/etc/cron.d/$app" +ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="/etc/cron.d/$app" +ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c7faa48..a81f194 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,7 +153,7 @@ fi #================================================= ynh_script_progression --message="Setuping a cron..." -cp ../conf/matomo.cron /etc/cron.d/$app +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"