From f07f384aedf65425e558e613c390e7bad458a2b9 Mon Sep 17 00:00:00 2001 From: Lorenzooone Date: Sun, 27 Oct 2024 11:59:51 +0100 Subject: [PATCH] Prevent running raspberry pi setup script as root --- rpi_setup/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpi_setup/setup.sh b/rpi_setup/setup.sh index d1a9299..682ccf0 100755 --- a/rpi_setup/setup.sh +++ b/rpi_setup/setup.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ "$(id -u)" -eq "0" ]; then + echo "This script must be run as a regular user!"; + exit 1; +fi + sudo apt update sudo apt -y install xterm gpiod xserver-xorg xinit libxcursor1 x11-xserver-utils pipewire pipewire-alsa