From 7e37fba04886e795aa942d17e4d41a038f3bfa92 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sun, 25 Nov 2018 17:17:37 -0500 Subject: [PATCH] check if vars filled out --- install.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index a4fd38d..4612dd7 100755 --- a/install.sh +++ b/install.sh @@ -7,19 +7,32 @@ # check if root if [ $EUID -ne 0 ] ; then - echo -e "This script must be run as root" - exit 1 + echo -e "This script must be run as root" + exit 1 fi # source vars source vars +if [ $user -eq "" ] ; then + echo -e "User missing from vars." + exit 1 +fi +if [ $projectname -eq "" ] ; then + echo -e "Project Name missing from vars." + exit 1 +fi +if [ $hostname -eq "" ] ; then + echo -e "Hostname missing from vars." + exit 1 +fi + tput setaf 2 echo -e "Installing dependencies" tput setaf 9 # create necessary dirs if [ ! -d $logdir ] ; then - mkdir $logdir + mkdir $logdir fi; # install dependencies