From 2d498ecee63ec1825fd7b88f81e014e5dd1453f5 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 24 Jan 2007 17:20:59 +0000 Subject: [PATCH] Fixed bug where the install script would die if you already had installed the dev env before --- .../src/modules/storageServer/bin/setupDirs.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/campcaster/src/modules/storageServer/bin/setupDirs.sh b/campcaster/src/modules/storageServer/bin/setupDirs.sh index fe58aa843..c697e8ed1 100755 --- a/campcaster/src/modules/storageServer/bin/setupDirs.sh +++ b/campcaster/src/modules/storageServer/bin/setupDirs.sh @@ -64,14 +64,16 @@ echo " *** The system group that is running the http daemon: '$HTTP_GROUP'" for i in $* do echo " *** chown :$HTTP_GROUP $i" - chown :$HTTP_GROUP $i || \ - { - ERN=$?; - echo "ERROR: chown :$HTTP_GROUP $i -> You should have permissions to set group owner to group '$HTTP_GROUP'"; - exit $ERN; - } - echo " *** chmod g+sw $i" - chmod g+sw $i || exit $? + if [ -G $i ]; then + chown :$HTTP_GROUP $i || \ + { + ERN=$?; + echo "ERROR: chown :$HTTP_GROUP $i -> You should have permissions to set group owner to group '$HTTP_GROUP'"; + exit $ERN; + } + echo " *** chmod g+sw $i" + chmod g+sw $i || exit $? + fi done echo " *** StorageServer bin/setupDirs.sh END"