From d9fcebb12d6d6a2218f54151bf491fea234641c2 Mon Sep 17 00:00:00 2001 From: ronivay Date: Fri, 1 Sep 2017 20:26:04 +0300 Subject: [PATCH] Check that docker is present for option 3 to work in installation script --- xo-install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xo-install.sh b/xo-install.sh index a2b0bcc..52549df 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -304,11 +304,20 @@ function CheckOS { function CheckSystemd { 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 fi } +function CheckDocker { + if [ -z $(which docker) ]; then + echo + echo "Docker needs to be installed for this to work" + exit 0 + fi + +} + function StartUpScreen { echo "-----------------------------------------" @@ -382,6 +391,7 @@ read -p ": " option exit 0 ;; 3) + CheckDocker echo echo "Build image locally or fetch from docker hub?" echo "1. Build"