Merge branch 'master' into mh-ps-scale

This commit is contained in:
Michael Hobbs
2015-04-30 10:32:29 -07:00
27 changed files with 196 additions and 132 deletions

View File

@@ -71,8 +71,8 @@ case "$1" in
verify_app_name "$2"
APP="$2"
if [[ -z $3 ]]; then
echo "Usage: dokku $1 $APP DOMAIN"
if [[ -z "${*:3}" ]]; then
echo "Usage: dokku $1 $APP DOMAIN [DOMAIN ...]"
echo "Must specify DOMAIN."
exit 1
fi
@@ -82,12 +82,17 @@ case "$1" in
exit 1
fi
shift 2
dokku domains:setup $APP
echo "$3" >> "$DOKKU_ROOT/$APP/VHOST"
for DOMAIN in "$@";do
echo "$DOMAIN" >> "$DOKKU_ROOT/$APP/VHOST"
done
# we need to restart the app to make sure we're binding to the appropriate network interface
dokku ps:restart $APP
dokku nginx:build-config $APP
pluginhook post-domains-update $APP
dokku_log_info1 "Added $3 to $APP"
for DOMAIN in "$@";do
dokku_log_info1 "Added $DOMAIN to $APP"
done
;;
@@ -108,16 +113,21 @@ case "$1" in
verify_app_name "$2"
APP="$2"
if [[ -z $3 ]]; then
echo "Usage: dokku $1 $2 DOMAIN"
if [[ -z "${*:3}" ]]; then
echo "Usage: dokku $1 $APP DOMAIN [DOMAIN ...]"
echo "Must specify DOMAIN."
exit 1
fi
shift 2
dokku domains:setup $APP
sed -i "/^$3$/d" "$DOKKU_ROOT/$APP/VHOST"
for DOMAIN in "$@";do
sed -i "/^$DOMAIN$/d" "$DOKKU_ROOT/$APP/VHOST"
done
pluginhook post-domains-update $APP
dokku_log_info1 "Removed $3 from $APP"
for DOMAIN in "$@";do
dokku_log_info1 "Removed $DOMAIN from $APP"
done
;;

View File

@@ -72,7 +72,7 @@ case "$1" in
;;
git-*)
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g')"
APP="$(echo $2 | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g' | sed 's/^\///g')"
APP_PATH=$DOKKU_ROOT/$APP
if [[ $1 == "git-receive-pack" && ! -d "$APP_PATH/refs" ]]; then
@@ -87,7 +87,11 @@ EOF
chmod +x $PRERECEIVE_HOOK
fi
args=$*
if [[ $1 == "git-receive-pack" ]]; then
args="$1 '$APP_PATH'"
else
args=$*
fi
git-shell -c "$args"
;;