Skip to content

Commit

Permalink
Added check whether Apache/MySQL is installed or not
Browse files Browse the repository at this point in the history
  • Loading branch information
PietsHost committed Sep 6, 2017
1 parent 85ded07 commit 843744b
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion nc_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ header=' _____ _ _ _ _ _
| __ (_) | | | | | | | |
| |__) | ___| |_ ___ | |__| | ___ ___| |_
| ___/ |/ _ \ __/ __| | __ |/ _ \/ __| __| +-+-+-+-+
| | | | __/ |_\__ \ | | | | (_) \__ \ |_ | v 1.7 |
| | | | __/ |_\__ \ | | | | (_) \__ \ |_ | v 1.8 |
|_| |_|\___|\__|___/ |_| |_|\___/|___/\__| +-+-+-+-+'

# Set color for Status
Expand Down Expand Up @@ -1305,6 +1305,33 @@ else
fi
stty echo

######### Warning Apache & MySQL
echo ""
{
type mysql >/dev/null 2>&1
} &> /dev/null
if [ $? -eq 0 ]; then
echo ""
else
printf $redbg"MySQL is not installed. Aborting...\n"$reset
sleeping2
abort
fi

{
ps -A | grep 'apache\|httpd'
} &> /dev/null
if [ $? -eq 0 ]; then
echo ""
else
printf $redbg"Apache is not installed/not running. Aborting..."$reset
echo ""
sleeping2
abort
fi

#########

###################################
###### Setup Page 2 Start #####
###################################
Expand Down

0 comments on commit 843744b

Please sign in to comment.