Skip to content

Commit

Permalink
ncp-update-nc: make sure cron.php is not running and there are no pen…
Browse files Browse the repository at this point in the history
…ding jobs
  • Loading branch information
nachoparker committed Oct 14, 2018
1 parent c036525 commit d6b7267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ echo "Current Nextcloud version $CURRENT"
echo "Available Nextcloud version $VER"
[[ "$NEED_UPDATE" == "true" ]] || { echo "Nothing to update"; exit 1; }

# make sure that cron.php is not running and there are no pending jobs
# https://github.com/nextcloud/server/issues/10949
pgrep -cf cron.php &>/dev/null && { pkill -f cron.php; sleep 3; }
pgrep -cf cron.php &>/dev/null && { echo "cron.php running. Abort"; exit 1; }
mysql nextcloud <<<"UPDATE oc_jobs SET reserved_at=0;"

# cleanup
####################
cleanup() {
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v0.64.1](https://github.com/nextcloud/nextcloudpi/commit/86c90e1) (2018-10-12) docker: make bin persistent too
[v0.64.2](https://github.com/nextcloud/nextcloudpi/commit/10562dc) (2018-10-14) ncp-update-nc: make sure cron.php is not running and there are no pending jobs

[v0.64.1](https://github.com/nextcloud/nextcloudpi/commit/c036525) (2018-10-12) docker: make bin persistent too

[v0.64.0 ](https://github.com/nextcloud/nextcloudpi/commit/a9b1542) (2018-10-12) upgrade to NC14.0.3

Expand Down

0 comments on commit d6b7267

Please sign in to comment.