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-update')
-rwxr-xr-xbin/ncp-update1
1 files changed, 1 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