mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-update: only root
This commit is contained in:
parent
c60ee017ab
commit
a3400775c1
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user