From 2333137b47d6c13f0dbc567064d9b49c6233c775 Mon Sep 17 00:00:00 2001 From: Bill Schouten <100612268+ctlinux@users.noreply.github.com> Date: Sun, 16 Jun 2024 18:11:48 -0400 Subject: [PATCH] Update rpi-setup.sh Add run as root --- rpi-setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpi-setup.sh b/rpi-setup.sh index dcba6d1..bd2ffd8 100644 --- a/rpi-setup.sh +++ b/rpi-setup.sh @@ -1,10 +1,11 @@ #!/bin/bash ### Script for configuration of Docker and Portainer for Debian-based systems (Debian, Ubuntu, Raspbian) ### -### This script must be run as root ### - # REF:https://docs.docker.com/engine/install/debian/#install-using-the-repository +# Ensure script is run as root +if [ "$(id -u)" -ne 0 ]; then echo "Please run as root." >&2; exit 1; fi + # Install pre-requisite packages echo "Installing required packages" sleep 2