check if vars filled out
This commit is contained in:
19
install.sh
19
install.sh
@@ -7,19 +7,32 @@
|
|||||||
|
|
||||||
# check if root
|
# check if root
|
||||||
if [ $EUID -ne 0 ] ; then
|
if [ $EUID -ne 0 ] ; then
|
||||||
echo -e "This script must be run as root"
|
echo -e "This script must be run as root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# source vars
|
# source vars
|
||||||
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
|
tput setaf 2
|
||||||
echo -e "Installing dependencies"
|
echo -e "Installing dependencies"
|
||||||
tput setaf 9
|
tput setaf 9
|
||||||
# create necessary dirs
|
# create necessary dirs
|
||||||
if [ ! -d $logdir ] ; then
|
if [ ! -d $logdir ] ; then
|
||||||
mkdir $logdir
|
mkdir $logdir
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user