Use DOKKU_ROOT instead of HOME.

HOME is not consistent if dokku is ran e.g. as root (for setup).
The DOKKU_ROOT variable will also make it possible to have the repositories stored in an arbitrary location (works-ish right now)
This commit is contained in:
Paul Lietar
2013-10-28 00:30:10 +00:00
parent e04f271d8e
commit b5c8dd7436
8 changed files with 37 additions and 35 deletions

View File

@@ -8,10 +8,10 @@ if [[ $1 == config ]] || [[ $1 == config:* ]]; then
exit 1
else
APP="$2"
ENV_FILE="$HOME/$APP/ENV"
ENV_FILE="$DOKKU_ROOT/$APP/ENV"
# Check if app exists with the same name
if [ ! -d "$HOME/$APP" ]; then
if [ ! -d "$DOKKU_ROOT/$APP" ]; then
echo "App $APP does not exist"
exit 1
fi
@@ -105,7 +105,7 @@ case "$1" in
exit 1
fi
APP="$2"; APP_DIR="$HOME/$APP"
APP="$2"; APP_DIR="$DOKKU_ROOT/$APP"
ENV_ADD=""
ENV_TEMP=`cat "${ENV_FILE}"`
ID=$(< "$APP_DIR/CONTAINER")
@@ -149,7 +149,7 @@ case "$1" in
exit 1
fi
APP="$2"; APP_DIR="$HOME/$APP"
APP="$2"; APP_DIR="$DOKKU_ROOT/$APP"
ENV_TEMP=`cat "${ENV_FILE}"`
ID=$(< "$APP_DIR/CONTAINER")
VARS="${*:3}"