- # make sure there is a symbolic link from the shadow path (that mimics the serverpilot
- # storage set up) to the real storage directory.
- if [ ! -L "$SHADOWPATH" ]; then
- # create the path up to but not including the last component.
- if [ ! -d $(dirname $SHADOWPATH) ]; then
- mkdir -p $(dirname $SHADOWPATH)
- if [ $? -ne 0 ]; then
- echo "The parent of the shadow path could not be created."
- echo "Path in question is: $(dirname $SHADOWPATH)"
- exit 1
- fi
- fi
-
- ln -s "$BASEPATH" "$SHADOWPATH"
-#hmmm: should we be okay with it if it's a real dir, and assume people are happy?
-# this wouldn't work too well if we go plunk down the new thing in /var/www,
-# if they are expecting this tool to totally meld with serverpilot.
- if [ $? -ne 0 ]; then
- echo "The shadow path for mimicking serverpilot could not be created."
- echo "Is there a real directory present for this already?"
- echo "Path in question is: $SHADOWPATH"
- exit 1
- fi
+ local our_app="$1"; shift
+ # make sure the base path for storage of all the apps for this user exists.
+ local full_path="$BASE_PATH/$our_app"
+echo full path is $full_path
+ if [ ! -d "$full_path" ]; then
+ mkdir -p $full_path
+ check_result "The app storage path could not be created.\n Path in question is: $full_path"