nextcloudpi/bin/ncp-check-nc-version
nachoparker a0728d7487 nc-notify-updates: notify of new supported NC versions
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-04 15:13:02 -06:00

17 lines
492 B
Bash
Executable File

#!/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