From 6b2466dd7f908afbad9cf048acfedbe420c5921b Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 22 Oct 2023 17:47:15 +0200 Subject: [PATCH] fix: server-update is root only --- tools/server-update.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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 -