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:
Diffstat (limited to 'bin/ncp-check-nc-version')
-rwxr-xr-xbin/ncp-check-nc-version16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/ncp-check-nc-version b/bin/ncp-check-nc-version
new file mode 100755
index 00000000..97ed40f9
--- /dev/null
+++ b/bin/ncp-check-nc-version
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# notify latest available NC version
+
+set -e
+
+source /usr/local/etc/library.sh # sets NCLATESTVER
+
+CURRENT="$(ncc status | grep "version:" | awk '{ print $3 }')"
+LATEST="$(wget -qO- https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/etc/ncp.cfg | jq -r .nextcloud_version)"
+
+if is_more_recent_than "${LATEST}" "${CURRENT}"; then
+ notify_admin \
+ "Nextcloud update" \
+ "Update from ${CURRENT} to "${LATEST}" is available. Update from https://$(get_ip):4443"
+fi