X-Git-Url: http://git.hcoop.net/clinton/scripts.git/blobdiff_plain/9278de4a01fb8743bed95e5a0d5640021391a3e5..74bfc8b7d79cbf6025e8389d00a3f96d0d33c454:/listnew diff --git a/listnew b/listnew index b811ebe..9040cc7 100755 --- a/listnew +++ b/listnew @@ -18,6 +18,10 @@ elif test -z "$5"; then echo "Not enough arguments" usage exit 1 +elif test "$UID" != "0"; then + echo "This program must be run as root" + usage + exit 1 else LIST_NAME=$1 LIST_DOMAIN=$2 @@ -26,8 +30,13 @@ else LIST_PASS=$5 fi -sudo -u list $BIN/newlist $LIST_NAME@$LIST_DOMAIN $LIST_USER@hcoop.net \ - $LIST_PASS