X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Faddsite;h=d2f515e7d64b1fb6b71d1ccef8b89d0d21a22e41;hb=7cff1da7d1aa69b2267315410b5d601f44742b80;hp=44d39b88cbfced4143504c629dcb6e01faa381dc;hpb=bc88473fc882311c342323143ad06e0a1500d78e;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index 44d39b8..d2f515e 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -21,7 +21,10 @@ PHP_CONFIG=conf/php.ini.override # PHP error logfile to set error_log to PHP_ERRORLOG=logs/php.log -DIR=$1 +# Get dir, but make it absolute +cd "$1" +DIR=`pwd` + if [ -e "$DIR" -a ! -d "$DIR" ]; then echo "$DIR" must be a directory, or not exist yet.