From a8c6c961272ba542e953991ae7a69aec26b326b4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Feb 2018 10:26:05 +0100 Subject: Prevent this script being run by any other user except 'root'. --- install-itzks-workstation | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'install-itzks-workstation') diff --git a/install-itzks-workstation b/install-itzks-workstation index 4e58c21..795c4b7 100755 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -1,6 +1,15 @@ #!/bin/bash # script for installing a Debian Edu Workstation with ITZkS modifications +if [ "x$(id -u)" != "x0" ]; then + echo + echo "##########################" + echo "$(basename $0): This script needs to be run as super-user 'root'." + echo "##########################" + echo + exit 1 +fi + # abort if any of the subprocesses returns non-zero exit code set -e -- cgit v1.2.3