diff --git a/conf/poller-cron b/conf/poller-cron index 03fbf99d..cd7401b3 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 Zotlabs/Daemon/Master.php Cron +*/10 * * * * __USER__ cd YNH_WWW_PATH; /usr/bin/php Zotlabs/Daemon/Master.php Cron diff --git a/scripts/install b/scripts/install index 64f12c62..d4bb1dca 100755 --- a/scripts/install +++ b/scripts/install @@ -140,8 +140,9 @@ ynh_add_fpm_config chown -R $app: $final_path # Set up poller -sed -i "s@YNH_WWW_PATH@$final_path@g" ../conf/poller-cron -sudo cp ../conf/poller-cron /etc/cron.d/$app +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 # Make app public ynh_app_setting_set $app skipped_uris "/" diff --git a/scripts/upgrade b/scripts/upgrade index 13caed40..04274cdc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,7 +122,8 @@ ynh_store_file_checksum "$final_path/.htconfig.php" ynh_use_logrotate "$final_path/php.log" --non-append # 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 #=================================================