diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-26 10:26:05 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-26 10:26:05 +0100 |
commit | a8c6c961272ba542e953991ae7a69aec26b326b4 (patch) | |
tree | 5eeda49f4a1121477d9fd69a0d8ca5ee3b0a7dc7 | |
parent | 922a2c8edda3dccfba5eecea2f5f14acff9158a7 (diff) | |
download | itzks-install-script-a8c6c961272ba542e953991ae7a69aec26b326b4.tar.gz itzks-install-script-a8c6c961272ba542e953991ae7a69aec26b326b4.tar.bz2 itzks-install-script-a8c6c961272ba542e953991ae7a69aec26b326b4.zip |
Prevent this script being run by any other user except 'root'.
-rwxr-xr-x | install-itzks-workstation | 9 |
1 files changed, 9 insertions, 0 deletions
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 |