From a9e48ab1b3c3d890da0009f28d67e6ede86d9d1f Mon Sep 17 00:00:00 2001 From: Jeremy Thomerson Date: Wed, 30 Mar 2011 19:18:12 +0000 Subject: require root to run setup-alpine-web --- setup-alpine-web.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup-alpine-web.in b/setup-alpine-web.in index 2d5d9cb..3eaed7d 100644 --- a/setup-alpine-web.in +++ b/setup-alpine-web.in @@ -123,6 +123,12 @@ EOF exit 0 } +# require root +if [ "$(id -u)" != "0" ]; then + echo "ERROR: This script must be run as root" 1>&2 + exit 1 +fi + # parse args while getopts "b:c:d:H:hR:" opts; do case "$opts" in -- cgit v1.2.3