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

ncp-check-nc-version « bin - github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97ed40f95950199397974d849296fb5e11710fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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