From a495b99bc5d38f82ee4b9428345ca122215337a7 Mon Sep 17 00:00:00 2001 From: william mantly Date: Mon, 16 Jan 2017 17:36:47 -0500 Subject: [PATCH] added down message to staging --- create.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/create.sh b/create.sh index 046b70a..63dafab 100644 --- a/create.sh +++ b/create.sh @@ -4,6 +4,18 @@ sshURL="$2" nodePort=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` workingPath=/var/www/gitwrapper/$name + +echo "creating apache VirtualHost file" + +echo "" > /etc/apache2/sites-enabled/$name.conf +echo " ServerName $name.staging.bytedev.co" >> /etc/apache2/sites-enabled/$name.conf +echo " DocumentRoot $workingPath/static/error_pages" >> /etc/apache2/sites-enabled/$name.conf + +echo "" >> /etc/apache2/sites-enabled/$name.conf + +/usr/sbin/service apache2 reload + + echo "starting $sshURL on $name" eval "$(ssh-agent -s)" @@ -74,6 +86,6 @@ echo " ProxyPassReverse /socket.io http://localhost:$nodePort/socket.io" >> / echo "" >> /etc/apache2/sites-enabled/$name.conf -/usr/sbin/service apache2 restart +/usr/sbin/service apache2 reload exit 0