X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Faddsite;h=7d318071d47456bfb88fa4573de04c2a630f1916;hb=31e323bd75fb798d58b0d19f8965b23dda181477;hp=dcae1079667bd8661963d0aa051fcba71d47b091;hpb=8cbae7c2c9aa2d4ed4371113e5900a9adbfa6d5e;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index dcae107..7d31807 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" @@ -14,8 +19,8 @@ HTTPD_USERS_GID=1002 # The template to copy TEMPLATE_DIR=/data/www/template # The bases to create users under -USERBASE="ou=Httpd Users,ou=Users,dc=drsnuggles,dc=stderr,dc=nl" -GROUPBASE="ou=Domain Groups,ou=Groups,dc=drsnuggles,dc=stderr,dc=nl" +USERBASE="uniqueIdentifier=7,uniqueIdentifier=6,dc=drsnuggles,dc=stderr,dc=nl" +GROUPBASE="uniqueIdentifier=4,uniqueIdentifier=8,dc=drsnuggles,dc=stderr,dc=nl" # PHP config to change the error_log setting in PHP_CONFIG=conf/php.ini.override # PHP error logfile to set error_log to @@ -63,17 +68,20 @@ else ldapvi --profile bind --add --in --ldapvi <