From aef583ebad4a8ba70aaaf856e05625d14af74ec0 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 23 Jan 2018 21:27:18 +0100 Subject: [PATCH] Check prerequisites at the start of install script --- ckan.sh | 7 +++++++ crisiscleanup.sh | 3 +++ cts.sh | 3 +++ gnuhealth.sh | 3 +++ kanboard.sh | 3 +++ mifosx.sh | 3 +++ motech.sh | 5 +++++ pandora.sh | 5 +++++ seeddms.sh | 3 +++ sigmah.sh | 3 +++ 10 files changed, 38 insertions(+) diff --git a/ckan.sh b/ckan.sh index 3678b47..a62dbab 100755 --- a/ckan.sh +++ b/ckan.sh @@ -2,6 +2,13 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan +# Check prerequisites +SCRIPT_DIR=$(realpath $(dirname "${0}")) +docker image ls | grep -q ckan-datapusher || ${SCRIPT_DIR}/ckan-datapusher.sh +docker image ls | grep -q postgres || ${SCRIPT_DIR}/postgres.sh +docker image ls | grep -q redis || ${SCRIPT_DIR}/redis.sh +docker image ls | grep -q solr || ${SCRIPT_DIR}/solr.sh + # Build Docker container docker build -t ckan ${SOURCE_DIR} diff --git a/crisiscleanup.sh b/crisiscleanup.sh index 656d093..b1b6e49 100755 --- a/crisiscleanup.sh +++ b/crisiscleanup.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/crisiscleanup +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Build Docker container docker build -t crisiscleanup ${SOURCE_DIR} diff --git a/cts.sh b/cts.sh index 553f591..94e63c9 100755 --- a/cts.sh +++ b/cts.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/cts +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Build Docker container docker build -t cts ${SOURCE_DIR} diff --git a/gnuhealth.sh b/gnuhealth.sh index 0330369..5f7ce4d 100755 --- a/gnuhealth.sh +++ b/gnuhealth.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/gnuhealth +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Build Docker container docker build -t gnuhealth ${SOURCE_DIR} diff --git a/kanboard.sh b/kanboard.sh index 705bc7b..be7fabc 100755 --- a/kanboard.sh +++ b/kanboard.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/kanboard +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Build Docker container docker build -t kanboard ${SOURCE_DIR} diff --git a/mifosx.sh b/mifosx.sh index 7b0ba4c..955455a 100755 --- a/mifosx.sh +++ b/mifosx.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/mifosx +# Check prerequisites +docker image ls | grep -q mariadb || $(realpath $(dirname "${0}"))/mariadb.sh + # Build Docker container docker build -t mifosx ${SOURCE_DIR} diff --git a/motech.sh b/motech.sh index 8bdc6be..bc02325 100755 --- a/motech.sh +++ b/motech.sh @@ -2,6 +2,11 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/motech +# Check prerequisites +SCRIPT_DIR=$(realpath $(dirname "${0}")) +docker image ls | grep -q activemq || ${SCRIPT_DIR}/activemq.sh +docker image ls | grep -q postgres || ${SCRIPT_DIR}/postgres.sh + # Build Docker container docker build -t motech ${SOURCE_DIR} diff --git a/pandora.sh b/pandora.sh index 1b352e3..62bc23f 100755 --- a/pandora.sh +++ b/pandora.sh @@ -2,6 +2,11 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/pandora +# Check prerequisites +SCRIPT_DIR=$(realpath $(dirname "${0}")) +docker image ls | grep -q rabbitmq || ${SCRIPT_DIR}/rabbitmq.sh +docker image ls | grep -q postgres || ${SCRIPT_DIR}/postgres.sh + # Build Docker container docker build -t pandora ${SOURCE_DIR} diff --git a/seeddms.sh b/seeddms.sh index 6e6a5e3..47a4c4a 100755 --- a/seeddms.sh +++ b/seeddms.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/seeddms +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Build Docker container docker build -t seeddms ${SOURCE_DIR} diff --git a/sigmah.sh b/sigmah.sh index e16a141..a0a25f9 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -2,6 +2,9 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/sigmah +# Check prerequisites +docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh + # Install dependencies apt-get -y --no-install-recommends install python-bcrypt