From a8068be88699ef7b807284319f4a65d01b58ca5f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Nov 2008 12:40:45 +0100 Subject: [PATCH] system: Let addsite always make DIR absolute. --- usr/local/bin/addsite | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.30.2