From a6629375f5d4cf8e500d8ef58972caf0c99c15b5 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Mon, 15 Jan 2018 20:06:06 +0100 Subject: [PATCH] Squash multiple mkdir commands --- ckan-datapusher.sh | 3 +-- ckan.sh | 3 +-- kanboard.sh | 3 +-- openmapkit.sh | 3 +-- seeddms.sh | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ckan-datapusher.sh b/ckan-datapusher.sh index 4437c39..844f99b 100755 --- a/ckan-datapusher.sh +++ b/ckan-datapusher.sh @@ -6,8 +6,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/ckan-datapusher docker build -t ckan-datapusher ${SOURCE_DIR} # Configure CKAN DataPusher -mkdir -p /srv/ckan-datapusher/conf -mkdir /srv/ckan-datapusher/data +mkdir -p /srv/ckan-datapusher/conf /srv/ckan-datapusher/data cp ${SOURCE_DIR}/srv/ckan-datapusher/conf/datapusher.wsgi /srv/ckan-datapusher/conf/datapusher.wsgi cp ${SOURCE_DIR}/srv/ckan-datapusher/conf/datapusher_settings.py /srv/ckan-datapusher/conf/datapusher_settings.py chown -R 8004:8004 /srv/ckan-datapusher/data diff --git a/ckan.sh b/ckan.sh index 790a5c2..f5d78bc 100755 --- a/ckan.sh +++ b/ckan.sh @@ -20,8 +20,7 @@ service solr restart # Configure CKAN export CKAN_SECRET=$(head -c 18 /dev/urandom | base64) export CKAN_UUID=$(cat /proc/sys/kernel/random/uuid) -mkdir -p /srv/ckan/conf -mkdir /srv/ckan/data +mkdir -p /srv/ckan/conf /srv/ckan/data envsubst <${SOURCE_DIR}/srv/ckan/conf/ckan.ini >/srv/ckan/conf/ckan.ini cp ${SOURCE_DIR}/srv/ckan/conf/who.ini /srv/ckan/conf/who.ini chown -R 8003:8003 /srv/ckan/data diff --git a/kanboard.sh b/kanboard.sh index 7d6405f..94fbd62 100755 --- a/kanboard.sh +++ b/kanboard.sh @@ -11,8 +11,7 @@ envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql docker run --rm kanboard cat /srv/kanboard/app/Schema/Sql/postgres.sql | docker exec -i -e PGPASSWORD=${KANBOARD_PWD} postgres psql kanboard kanboard # Configure Kanboard -mkdir -p /srv/kanboard/conf -mkdir /srv/kanboard/data +mkdir -p /srv/kanboard/conf /srv/kanboard/data envsubst <${SOURCE_DIR}/srv/kanboard/conf/config.php >/srv/kanboard/conf/config.php export KANBOARD_ADMIN_USER=admin export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) diff --git a/openmapkit.sh b/openmapkit.sh index 457a015..3bc6e28 100755 --- a/openmapkit.sh +++ b/openmapkit.sh @@ -8,8 +8,7 @@ docker build -t openmapkit ${SOURCE_DIR} # Configure OpenMapKit export OMK_ADMIN_USER="admin" export OMK_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) -mkdir -p /srv/openmapkit/data/deployments -mkdir /srv/openmapkit/data/submissions +mkdir -p /srv/openmapkit/data/deployments /srv/openmapkit/data/submissions envsubst <${SOURCE_DIR}/srv/openmapkit/settings.js >/srv/openmapkit/settings.js chown -R 8007:8007 /srv/openmapkit/data diff --git a/seeddms.sh b/seeddms.sh index a0af46d..d07a402 100755 --- a/seeddms.sh +++ b/seeddms.sh @@ -11,8 +11,7 @@ envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql docker run --rm seeddms cat /srv/seeddms/create_tables-postgres.sql | docker exec -i -e PGPASSWORD=${SEEDDMS_PWD} postgres psql seeddms seeddms # Copy existing files into persistent storage -mkdir -p /srv/seeddms/conf -mkdir /srv/seeddms/data +mkdir -p /srv/seeddms/conf /srv/seeddms/data docker run --rm -v /srv/seeddms/conf:/mnt/conf seeddms cp -rp /srv/seeddms/www/conf/. /mnt/conf docker run --rm -v /srv/seeddms/data:/mnt/conf seeddms cp -rp /srv/seeddms/data/. /mnt/conf chown -R 8010:8010 /srv/seeddms/data