From 445748551fa630f62922de3f4a32b89ae1037212 Mon Sep 17 00:00:00 2001 From: nacho Date: Fri, 21 Sep 2018 23:49:12 -0600 Subject: [PATCH] autoupdate: log everything to ncp.log --- etc/ncp-config.d/nc-autoupdate-nc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/ncp-config.d/nc-autoupdate-nc.sh b/etc/ncp-config.d/nc-autoupdate-nc.sh index 3d8e990ae..7b5bf232d 100644 --- a/etc/ncp-config.d/nc-autoupdate-nc.sh +++ b/etc/ncp-config.d/nc-autoupdate-nc.sh @@ -25,8 +25,13 @@ configure() cat > /etc/cron.daily/ncp-autoupdate-nc <> /var/log/ncp.log + +if /usr/local/bin/ncp-update-nc "$VERSION" 2>&1 | tee -a /var/log/ncp.log; then + VER="\$( sudo -u www-data php /var/www/nextcloud/occ status | grep "version:" | awk '{ print \$3 }' )" + sudo -u www-data php /var/www/nextcloud/occ notification:generate \ "$NOTIFYUSER_" "NextCloudPi" -l "Nextcloud was updated to \$VER" fi