From f3e46227d8c71b8fa0599eb8b9916bb4833bac63 Mon Sep 17 00:00:00 2001 From: Federico Torres Date: Sat, 1 Mar 2025 16:56:21 -0300 Subject: [PATCH] fix: check if remote-install.sh is being run as root --- scripts/remote-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/remote-install.sh b/scripts/remote-install.sh index cdc8b3de..67664789 100644 --- a/scripts/remote-install.sh +++ b/scripts/remote-install.sh @@ -38,6 +38,13 @@ function log { } lsb_release -d | grep "LTS" > /dev/null + +if [ "$EUID" -ne 0 ] +then + echo "This script must be run as root" + exit 1 +fi + if [ $? != 0 ] then echo "This script can only be run on a Linux Ubuntu LTS release"