Check that docker is present for option 3 to work in installation script

This commit is contained in:
ronivay
2017-09-01 20:26:04 +03:00
parent 2eb8e9c250
commit d9fcebb12d

View File

@@ -304,11 +304,20 @@ function CheckOS {
function CheckSystemd { function CheckSystemd {
if [ ! $(which systemctl) ]; then if [ ! $(which systemctl) ]; then
echo "This tool is implemented to work with systemd enabled systems only" echo "This tool is designed to work with systemd enabled systems only"
exit 0 exit 0
fi fi
} }
function CheckDocker {
if [ -z $(which docker) ]; then
echo
echo "Docker needs to be installed for this to work"
exit 0
fi
}
function StartUpScreen { function StartUpScreen {
echo "-----------------------------------------" echo "-----------------------------------------"
@@ -382,6 +391,7 @@ read -p ": " option
exit 0 exit 0
;; ;;
3) 3)
CheckDocker
echo echo
echo "Build image locally or fetch from docker hub?" echo "Build image locally or fetch from docker hub?"
echo "1. Build" echo "1. Build"