From a189c314851c2d7164996d563af908cbc2d9828e Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 22 Oct 2023 17:49:57 +0200 Subject: [PATCH] fix: shellify scripts --- tools/server-setup.sh | 2 +- tools/server-update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/server-setup.sh b/tools/server-setup.sh index ebed4ce..85c9d8b 100755 --- a/tools/server-setup.sh +++ b/tools/server-setup.sh @@ -6,7 +6,7 @@ ORIGIN_PWD="$PWD" -if ! [ "$UID" = "0" ]; then +if ! [ "$(id -u)" = "0" ]; then echo "please perform as root, attempting to escalate privileges..." exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g') exit 1 diff --git a/tools/server-update.sh b/tools/server-update.sh index a3a3cbd..bbc9b57 100755 --- a/tools/server-update.sh +++ b/tools/server-update.sh @@ -1,6 +1,6 @@ #!/bin/sh -if ! [ "$UID" = "0" ]; then +if ! [ "$(id -u)" = "0" ]; then echo "please perform as root, attempting to escalate privileges..." exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g') exit 1