From b588774f7eed72ca021215bc61b0bd899acc6fc0 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Wed, 14 Dec 2022 11:48:21 +0100 Subject: [PATCH] Prevent running as root --- setup_system.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup_system.sh b/setup_system.sh index 121b358..1f0e444 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -345,6 +345,11 @@ function setup_debian() { change_shell || return 13 } +if [ "$EUID" -eq 0 ]; then + echo "Don't run this script as root." 1>&2 + exit 2 +fi + ID_LIKE="$(grep ID_LIKE=