From 2426d9c4071f448d4ff81a2c22f79f60b7a3fa67 Mon Sep 17 00:00:00 2001 From: Axel DE VIGNON Date: Wed, 27 Sep 2017 15:29:43 +0200 Subject: [PATCH] Fixing the createvhost script --- create-vhost.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/create-vhost.sh b/create-vhost.sh index f71c2bb..7ab8196 100755 --- a/create-vhost.sh +++ b/create-vhost.sh @@ -10,9 +10,14 @@ function success { currentdir=`pwd` -echo -echo "= APPLICATION CONFIGURATION =" -echo + + +who=`whoami` +if [ "$who" = "vagrant" ] +then + error "This script is supposed to be run from the host, not from the guest" + exit 1 +fi # Checking whether /etc/hosts file exists if [ ! -f "/etc/hosts" ] @@ -25,6 +30,11 @@ else fi +echo +echo "= APPLICATION CONFIGURATION =" +echo + + # Checking Vagrant root path echo while true