diff --git a/tools/server-update.sh b/tools/server-update.sh index fe66018..dfb45a6 100755 --- a/tools/server-update.sh +++ b/tools/server-update.sh @@ -1,5 +1,11 @@ #!/bin/sh +if ! [ "$UID" = "0" ]; then + echo "please perform as root, attempting to escalate privileges..." + exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g') + exit 1 +fi + if cd /etc/ixvd/secrets; then git pull cd -