From d69ade0585b7b28a9ae2c12e21555b8a67c14247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Mon, 27 May 2019 12:44:46 +0200 Subject: [PATCH] fix cron permissions --- conf/freshrss.cron | 2 +- scripts/install | 1 + scripts/upgrade | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/conf/freshrss.cron b/conf/freshrss.cron index 4b9edce..0f5321c 100644 --- a/conf/freshrss.cron +++ b/conf/freshrss.cron @@ -1 +1 @@ -*/10 * * * * www-data /usr/bin/php __FINALPATH__/app/actualize_script.php >/tmp/FreshRSS.log 2>&1 +*/10 * * * * __APP__ /usr/bin/php7.0 __FINALPATH__/app/actualize_script.php >/tmp/FreshRSS.log 2>&1 diff --git a/scripts/install b/scripts/install index c2111ed..0d0bfd7 100755 --- a/scripts/install +++ b/scripts/install @@ -168,6 +168,7 @@ done ynh_print_info "Setting up cron..." cron_path="/etc/cron.d/$app" ynh_replace_string "__FINALPATH__" $final_path ../conf/freshrss.cron +ynh_replace_string "__APP__" $app ../conf/freshrss.cron cp ../conf/freshrss.cron "$cron_path" chmod 644 "$cron_path" diff --git a/scripts/upgrade b/scripts/upgrade index 19b352e..557962f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,6 +141,16 @@ ynh_replace_string "APPNAMETOCHANGE" $app ../hooks/post_app_addaccess ynh_replace_string "APPNAMETOCHANGE" $app ../hooks/post_user_create ynh_replace_string "APPNAMETOCHANGE" $app ../hooks/post_user_delete +#================================================= +# CRON SETUP +#================================================= +ynh_print_info "Setting up cron..." +cron_path="/etc/cron.d/$app" +ynh_replace_string "__FINALPATH__" $final_path ../conf/freshrss.cron +ynh_replace_string "__APP__" $app ../conf/freshrss.cron +cp ../conf/freshrss.cron "$cron_path" +chmod 644 "$cron_path" + #================================================= # GENERIC FINALIZATION #=================================================