From 47aae9573917c701ea8548548d1fe2b0e9bc662f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 29 Jul 2009 10:05:34 +0200 Subject: [PATCH] addsite: Check we're not running as root. --- usr/local/bin/addsite | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index dcae107..9ef8ae4 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -1,5 +1,10 @@ #!/bin/sh +if [ "$UID" -eq 0 ]; then + echo "No need to run as root." + exit 1 +fi + if [ "$1" = "-h" -o "$1" = "--help" -o $# -ne 1 ]; then echo "Usage $0 " echo " is the full path to the site, such as /var/www/example.nl" -- 2.30.2