From 5998fda295f0b1267ce3b0a9b16fc061be665098 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 22 May 2021 10:50:12 +0200 Subject: [PATCH] Fix --- scripts/install | 2 +- scripts/upgrade | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/scripts/install b/scripts/install index 07f9269..93bb6b6 100755 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ done ynh_script_progression --message="Setting up cron..." ynh_add_config --template="../conf/freshrss.cron" --destination="/etc/cron.d/$app" -chmod 644 "$cron_path" +chmod 644 "/etc/cron.d/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 6f57ad0..06cbe61 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,13 +71,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -146,14 +139,8 @@ cp -rp "$tmp_path" "$final_path" #================================================= ynh_script_progression --message="Setting up cron..." -cron_path="/etc/cron.d/$app" - -ynh_replace_string --match_string="__FINALPATH__" --replace_string=$final_path --target_file="../conf/freshrss.cron" -ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="../conf/freshrss.cron" -ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file="../conf/freshrss.cron" - -cp ../conf/freshrss.cron "$cron_path" -chmod 644 "$cron_path" +ynh_add_config --template="../conf/freshrss.cron" --destination="/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" if [ -f /tmp/FreshRSS.log ]; then ynh_secure_remove /tmp/FreshRSS.log @@ -185,7 +172,7 @@ ynh_app_setting_delete --app="$app" --key=unprotected_uris ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." ynh_systemd_action --service_name=nginx --action=reload -ynh_systemd_action --service_name=php$YNH_PHP_VERSION-fpm --action=reload +ynh_systemd_action --service_name=php$phpversion-fpm --action=reload #================================================= # END OF SCRIPT