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:
authornachoparker <nacho@ownyourbits.com>2019-07-25 02:13:11 +0300
committernachoparker <nacho@ownyourbits.com>2019-07-25 02:26:05 +0300
commite30271f96f5c162b5c32ec41aa7987ae66bce62c (patch)
treeaeb6d999e9f98d82e90c80e461f5a9b80066e6c8
parent2fb7225d28cbac6d124533eb0cbc5ada0ccb731f (diff)
armbian: fix distro check
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r--etc/library.sh7
-rw-r--r--etc/ncp.cfg6
-rw-r--r--ncp.sh2
-rwxr-xr-xupdate.sh2
-rw-r--r--updates/1.16.0.sh3
5 files changed, 7 insertions, 13 deletions
diff --git a/etc/library.sh b/etc/library.sh
index 3ddd4c7f..b6a13c69 100644
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -273,11 +273,8 @@ function is_more_recent_than()
function check_distro()
{
local cfg="${1:-$NCPCFG}"
- local len="$(jq '.release_issue | length' < "$cfg")"
- for i in $(seq 0 $((len-1))); do
- local supported=$(jq -r .release_issue[$i] < "$cfg")
- grep -q "$supported" /etc/issue && return 0
- done
+ local supported=$(jq -r .release < "$cfg")
+ grep -q "$supported" <(lsb_release -sc) && return 0
return 1
}
diff --git a/etc/ncp.cfg b/etc/ncp.cfg
index 5adf74ae..c72d92c8 100644
--- a/etc/ncp.cfg
+++ b/etc/ncp.cfg
@@ -1,9 +1,5 @@
{
"nextcloud_version": "16.0.3",
"php_version": "7.3",
- "release": "buster",
- "release_issue": [
- "Debian GNU/Linux 10",
- "Raspbian GNU/Linux 10"
- ]
+ "release": "buster"
}
diff --git a/ncp.sh b/ncp.sh
index 937f76cd..69db9872 100644
--- a/ncp.sh
+++ b/ncp.sh
@@ -22,7 +22,7 @@ install()
{
# NCP-CONFIG
apt-get update
- $APTINSTALL git dialog whiptail jq file
+ $APTINSTALL git dialog whiptail jq file lsb-release
mkdir -p "$CONFDIR" "$BINDIR"
# include option in raspi-config (only Raspbian)
diff --git a/update.sh b/update.sh
index 75103b90..18c49871 100755
--- a/update.sh
+++ b/update.sh
@@ -165,12 +165,10 @@ is_active_app nc-autoupdate-nc && run_app nc-autoupdate-nc
check_distro "$NCPCFG" && check_distro etc/ncp.cfg || {
php_ver_new=$(jq -r '.php_version' < etc/ncp.cfg)
release_new=$(jq -r '.release' < etc/ncp.cfg)
- issue_new=$( jq -r '.release_issue' < etc/ncp.cfg)
cfg="$(jq '.' "$NCPCFG")"
cfg="$(jq '.php_version = "'$php_ver_new'"' <<<"$cfg")"
cfg="$(jq '.release = "'$release_new'"' <<<"$cfg")"
- cfg="$(jq '.release_issue = '"$issue_new" <<<"$cfg")"
echo "$cfg" > /usr/local/etc/ncp-recommended.cfg
[[ -f /.dockerenv ]] && \
diff --git a/updates/1.16.0.sh b/updates/1.16.0.sh
index 9ec1ffe2..0748c2df 100644
--- a/updates/1.16.0.sh
+++ b/updates/1.16.0.sh
@@ -12,6 +12,9 @@ source /usr/local/etc/library.sh
apt-get update
apt-get install -y --no-install-recommends php-smbclient exfat-fuse exfat-utils
+# install lsb-release
+apt-get install -y --no-install-recommends lsb-release
+
# docker images only
[[ -f /.docker-image ]] && {
: