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>2017-04-04 19:52:39 +0300
committernachoparker <nacho@ownyourbits.com>2017-04-04 19:52:39 +0300
commita3400775c159852625ff843b26912dfae6daab95 (patch)
treeef309117d8b91e1513d660f89c8255aa000984b2
parentc60ee017ab7a5e5cbbcf7166e87806a878be0e11 (diff)
ncp-update: only rootv0.5.8
-rwxr-xr-xbin/ncp-update1
-rwxr-xr-xnextcloud.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/bin/ncp-update b/bin/ncp-update
index c387d515..9245882a 100755
--- a/bin/ncp-update
+++ b/bin/ncp-update
@@ -3,6 +3,7 @@
# update latest NextCloudPi code from github
{
+ [ $(id -u) -ne 0 ] && { printf "Must be run as root. Try 'sudo $0'\n"; exit 1; }
ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; exit 1; }
echo -e "Downloading updates"
rm -rf /tmp/ncp-update-tmp
diff --git a/nextcloud.sh b/nextcloud.sh
index c5be3168..0c3af744 100755
--- a/nextcloud.sh
+++ b/nextcloud.sh
@@ -267,6 +267,7 @@ EOF
cat > /usr/local/bin/ncp-update <<'EOF'
#!/bin/bash
{
+ [ $(id -u) -ne 0 ] && { printf "Must be run as root. Try 'sudo $0'\n"; exit 1; }
ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; exit 1; }
echo -e "Downloading updates"
rm -rf /tmp/ncp-update-tmp