From c97acf8a8e7aa1ba17d5f5d7379635dd82259563 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sun, 20 May 2018 13:38:16 +0200 Subject: ncp-autoupdate: dont return 0 if no updates available --- changelog.md | 8 +++++--- etc/ncp-config.d/nc-autoupdate-nc.sh | 4 ++-- etc/ncp-config.d/nc-autoupdate-ncp.sh | 6 +++--- update.sh | 12 ++++++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/changelog.md b/changelog.md index eb3dd47f..b325075a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,11 @@ -[v0.56.4](https://github.com/nextcloud/nextcloudpi/commit/d9ccd20) (2018-05-18) nc-info: change port checker providers +[v0.56.5](https://github.com/nextcloud/nextcloudpi/commit/fb75d21) (2018-05-20) ncp-autoupdate: dont return 0 if no updates available -[v0.56.3](https://github.com/nextcloud/nextcloudpi/commit/31543e6) (2018-05-17) nc-update-nextcloud: make sure backup syncs to disk +[v0.56.4 ](https://github.com/nextcloud/nextcloudpi/commit/656d2d8) (2018-05-18) nc-info: change port checker providers -[v0.56.2](https://github.com/nextcloud/nextcloudpi/commit/5ff8675) (2018-05-15) nc-restore: refuse to restore from /var/www/nextcloud +[v0.56.3 ](https://github.com/nextcloud/nextcloudpi/commit/31543e6) (2018-05-17) nc-update-nextcloud: make sure backup syncs to disk + +[v0.56.2 ](https://github.com/nextcloud/nextcloudpi/commit/5ff8675) (2018-05-15) nc-restore: refuse to restore from /var/www/nextcloud [v0.56.1 ](https://github.com/nextcloud/nextcloudpi/commit/06f1d5c) (2018-05-15) nc-update-nextcloud: rollback in case of power cut diff --git a/etc/ncp-config.d/nc-autoupdate-nc.sh b/etc/ncp-config.d/nc-autoupdate-nc.sh index 6d775ab8..0c639342 100644 --- a/etc/ncp-config.d/nc-autoupdate-nc.sh +++ b/etc/ncp-config.d/nc-autoupdate-nc.sh @@ -28,11 +28,11 @@ configure() cat > /etc/cron.daily/ncp-autoupdate-nc < /etc/cron.daily/ncp-autoupdate </dev/null + F="$CONFDIR"/nc-autoupdate-ncp.sh + grep -q '^ACTIVE_=yes$' "$F" && { + cd "$CONFDIR" &>/dev/null + activate_script nc-autoupdate-ncp.sh + cd - &>/dev/null + } + F="$CONFDIR"/nc-autoupdate-nc.sh + grep -q '^ACTIVE_=yes$' "$F" && { + cd "$CONFDIR" &>/dev/null + activate_script nc-autoupdate-nc.sh + cd - &>/dev/null + } } # end - only live updates -- cgit v1.2.3