Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/ncp-config.d/nc-autoupdate-nc.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/ncp-config.d/nc-autoupdate-nc.sh b/etc/ncp-config.d/nc-autoupdate-nc.sh
index 3d8e990a..7b5bf232 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 <<EOF
#!/bin/bash
-if /usr/local/bin/ncp-update-nc "$VERSION"; then
+
+echo -e "[ncp-update-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