diff --git a/scripts/change_url b/scripts/change_url index 399a739..326594f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -79,7 +79,7 @@ then ynh_add_systemd_config --service="${app}-notify-push" count=0 - while ! exec_occ background:cron && [[ $count -lt 30 ]] + while ! ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php && [[ $count -lt 30 ]] do sleep 1 count=$((count + 1)) diff --git a/scripts/config b/scripts/config index c3a06c6..189c448 100644 --- a/scripts/config +++ b/scripts/config @@ -142,7 +142,7 @@ set__enable_notify_push() { ynh_add_systemd_config --service="${app}-notify-push" count=0 - while ! exec_occ background:cron && [[ $count -lt 30 ]] + while ! ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php && [[ $count -lt 30 ]] do sleep 1 count=$((count + 1)) diff --git a/scripts/install b/scripts/install index 9b8698a..2df768a 100755 --- a/scripts/install +++ b/scripts/install @@ -300,7 +300,7 @@ ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.* if [ $enable_notify_push -eq 1 ] then count=0 - while ! exec_occ background:cron && [[ $count -lt 30 ]] + while ! ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php && [[ $count -lt 30 ]] do sleep 1 count=$((count + 1)) diff --git a/scripts/restore b/scripts/restore index 8bea858..1393ae3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -163,7 +163,7 @@ exec_occ() { if [ $enable_notify_push -eq 1 ] then count=0 - while ! exec_occ background:cron && [[ $count -lt 30 ]] + while ! ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php && [[ $count -lt 30 ]] do sleep 1 count=$((count + 1)) diff --git a/scripts/upgrade b/scripts/upgrade index e34e20a..7706d05 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -444,7 +444,7 @@ ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.* if [ $enable_notify_push -eq 1 ] then count=0 - while ! exec_occ background:cron && [[ $count -lt 30 ]] + while ! ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php && [[ $count -lt 30 ]] do sleep 1 count=$((count + 1))