diff --git a/scripts/change_url b/scripts/change_url index 34b9f54..228e59f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -77,7 +77,9 @@ then ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" ynh_add_config --template="watcher.path" --destination="/etc/systemd/system/${app}-notify-push-watcher.path" - ynh_systemd_action --service_name="${app}-notify-push" --action=restart + ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php + + ynh_systemd_action --service_name="${app}-notify-push" --action=restart --line_match="Push daemon for Nextcloud clients." --log_path="systemd" --action=restart exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push diff --git a/scripts/install b/scripts/install index c9f9291..a11733d 100755 --- a/scripts/install +++ b/scripts/install @@ -298,9 +298,11 @@ ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.* if [ $enable_notify_push -eq 1 ] then - ynh_systemd_action --service_name="${app}-notify-push-watcher" --action=restart - ynh_systemd_action --service_name="${app}-notify-push" --action=restart + ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php + ynh_systemd_action --service_name="${app}-notify-push-watcher" --action=restart + ynh_systemd_action --service_name="${app}-notify-push" --action=restart --line_match="Push daemon for Nextcloud clients." --log_path="systemd" + if ! exec_occ notify_push:self-test; then ynh_print_warn --message="The High Performance Backend service is still not working properly. Please log in with a user to your NextCloud instance, restart the High Performance Backend service with \"systemctl restart ${app}-notify-push.service\", and run \"sudo -u $app php${phpversion} $install_dir/occ notify_push:self-test\" to verify that everything is green." fi diff --git a/scripts/restore b/scripts/restore index a7c73dd..5910e4c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -161,8 +161,10 @@ exec_occ() { if [ $enable_notify_push -eq 1 ] then + ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php + ynh_systemd_action --service_name="${app}-notify-push-watcher" --action=restart - ynh_systemd_action --service_name="${app}-notify-push" --action=restart + ynh_systemd_action --service_name="${app}-notify-push" --action=restart --line_match="Push daemon for Nextcloud clients." --log_path="systemd" --action=restart if ! exec_occ notify_push:self-test; then ynh_print_warn --message="The High Performance Backend service is still not working properly. Please log in with a user to your NextCloud instance, restart the High Performance Backend service with \"systemctl restart ${app}-notify-push.service\", and run \"sudo -u $app php${phpversion} $install_dir/occ notify_push:self-test\" to verify that everything is green." diff --git a/scripts/upgrade b/scripts/upgrade index 273ee18..2aecbfe 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -441,8 +441,10 @@ ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.* if [ $enable_notify_push -eq 1 ] then + ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php + ynh_systemd_action --service_name="${app}-notify-push-watcher" --action=restart - ynh_systemd_action --service_name="${app}-notify-push" --action=restart + ynh_systemd_action --service_name="${app}-notify-push" --action=restart --line_match="Push daemon for Nextcloud clients." --log_path="systemd" --action=restart if ! exec_occ notify_push:self-test; then ynh_print_warn --message="The High Performance Backend service is still not working properly. Please log in with a user to your NextCloud instance, restart the High Performance Backend service with \"systemctl restart ${app}-notify-push.service\", and run \"sudo -u $app php${phpversion} $install_dir/occ notify_push:self-test\" to verify that everything is green."