From cbb358c947de8d7489e7c7b2c9e4f308fc0c6cd9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Aug 2015 19:20:31 +0200 Subject: [PATCH] Check prerequisites before install --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index daa4ccd..dbc6913 100755 --- a/install.sh +++ b/install.sh @@ -19,6 +19,15 @@ if [ "$#" -ne 3 ]; then exit fi +# Ensure there are the prerequisites +for i in openvpn mysql php bower node unzip wget sed; do + which $i > /dev/null + if [ "$?" -ne 0 ]; then + echo "Miss $i" + exit + fi +done + www=$1 user=$2 group=$3