From a3400775c159852625ff843b26912dfae6daab95 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Tue, 4 Apr 2017 18:52:39 +0200 Subject: ncp-update: only root --- bin/ncp-update | 1 + 1 file changed, 1 insertion(+) (limited to 'bin/ncp-update') 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 -- cgit v1.2.3