From 00f36f3be2900a74bb4a22a2e310077e02a0556d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 11 Jun 2018 12:37:15 +0200 Subject: [PATCH] Fix crontab --- conf/poller-cron | 4 ++-- scripts/install | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/conf/poller-cron b/conf/poller-cron index 0e284be..8367ccd 100644 --- a/conf/poller-cron +++ b/conf/poller-cron @@ -1,2 +1,2 @@ -# Run poller periodically to update Hubzilla -*/10 * * * * cd YNH_WWW_PATH; /usr/bin/php bin/worker.php +# Run poller periodically to update Friendica +*/10 * * * * __USER__ cd __YNH_WWW_PATH__; /usr/bin/php bin/worker.php diff --git a/scripts/install b/scripts/install index ee9cdfc..5bb1bf5 100644 --- a/scripts/install +++ b/scripts/install @@ -143,7 +143,8 @@ sudo chmod -R 777 $final_path/view/smarty3 chown -R $app: $final_path # Set up poller -sed -i "s@YNH_WWW_PATH@$final_path@g" ../conf/poller-cron +ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron +ynh_replace_string "__USER__" "$app" ../conf/poller-cron sudo cp ../conf/poller-cron /etc/cron.d/$app #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 916dc2d..c4b9864 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,7 +97,8 @@ ynh_backup_if_checksum_is_different "$final_path/.htconfig.php" ynh_store_file_checksum "$final_path/.htconfig.php" # Set up poller -sed -i "s@YNH_WWW_PATH@$final_path@g" ../conf/poller-cron +ynh_replace_string "__YNH_WWW_PATH__" "$final_path" ../conf/poller-cron +ynh_replace_string "__USER__" "$app" ../conf/poller-cron sudo cp ../conf/poller-cron /etc/cron.d/$app # Run composer