From 94d7b957a8856802d337212f74f6196462639b8b Mon Sep 17 00:00:00 2001 From: idanoo Date: Wed, 12 Oct 2022 09:21:17 +1300 Subject: [PATCH] Add root check --- static/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/setup.sh b/static/setup.sh index dd7bb7d..c041217 100644 --- a/static/setup.sh +++ b/static/setup.sh @@ -4,6 +4,11 @@ # curl -sS "https://m2.nz/setup.sh" | bash # rm -fr ~/.ssh/authorized_keys +# Root check +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi # Clean up if needed if [[ "$1" == "uninstall" ]]; then