ip vs domain

This commit is contained in:
Jeff Lindsay
2013-06-10 02:13:47 -07:00
parent 8717d6355d
commit d66abeb487
3 changed files with 7 additions and 3 deletions

View File

@@ -19,7 +19,11 @@ start nginx-reloader
/etc/init.d/nginx start /etc/init.d/nginx start
echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf
echo $HOSTNAME > /home/git/DOMAIN if [[ $(dig +short $HOSTNAME) ]]; then
echo $HOSTNAME > /home/git/DOMAIN
else
echo $HOSTNAME > /home/git/HOSTNAME
fi
echo echo
echo "Be sure to upload a public key for your user:" echo "Be sure to upload a public key for your user:"

View File

@@ -14,7 +14,7 @@ if [[ ! -f "$HOME/$APP/PORT" ]]; then
$HOME/nginx-app-conf $APP $PORT $HOSTNAME > $HOME/$APP/nginx.conf $HOME/nginx-app-conf $APP $PORT $HOSTNAME > $HOME/$APP/nginx.conf
nc -U $HOME/reload-nginx nc -U $HOME/reload-nginx
else else
HOSTNAME="$(hostname -i | cut -d' ' -f3):$PORT" HOSTNAME="$(< "$HOME/HOSTNAME"):$PORT"
fi fi
echo $HOSTNAME > "$HOME/$APP/HOSTNAME" echo $HOSTNAME > "$HOME/$APP/HOSTNAME"
else else