From 99cb7761a6c7292b8e2d7fe28174bf21fb1c2b85 Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Tue, 16 Aug 2022 15:08:00 +0100 Subject: [PATCH] fix sed apostrophe error and couchdb path --- hosting/scripts/build-target-paths.sh | 8 ++++++-- hosting/single/couch/local.ini | 4 ++-- hosting/single/healthcheck.sh | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hosting/scripts/build-target-paths.sh b/hosting/scripts/build-target-paths.sh index 6d5a8429f8..ee314c1ce4 100644 --- a/hosting/scripts/build-target-paths.sh +++ b/hosting/scripts/build-target-paths.sh @@ -11,6 +11,10 @@ if [[ "${TARGETBUILD}" = "aas" ]]; then apt-get install -y openssh-server sed -i "s/#Port 22/Port 2222/" /etc/ssh/sshd_config /etc/init.d/ssh restart -fi + sed -i "s#DATA_DIR#/home#g" /opt/clouseau/clouseau.ini + sed -i "s#DATA_DIR#/home#g" /opt/couchdb/etc/local.ini +else + sed -i "s#DATA_DIR#/data#g" /opt/clouseau/clouseau.ini + sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini -sed -i 's#DATA_DIR#$DATA_DIR#' /opt/clouseau/clouseau.ini /opt/couchdb/etc/local.ini +fi \ No newline at end of file diff --git a/hosting/single/couch/local.ini b/hosting/single/couch/local.ini index 266c0d4b60..35f0383dfc 100644 --- a/hosting/single/couch/local.ini +++ b/hosting/single/couch/local.ini @@ -1,5 +1,5 @@ ; CouchDB Configuration Settings [couchdb] -database_dir = DATA_DIR/couch/dbs -view_index_dir = DATA_DIR/couch/views +database_dir = DATA_DIR/couchdb/dbs +view_index_dir = DATA_DIR/couchdb/views diff --git a/hosting/single/healthcheck.sh b/hosting/single/healthcheck.sh index b92cd153a3..592b3e94fa 100644 --- a/hosting/single/healthcheck.sh +++ b/hosting/single/healthcheck.sh @@ -3,6 +3,11 @@ healthy=true if [ -f "/data/.env" ]; then export $(cat /data/.env | xargs) +elif [ -f "/home/.env" ]; then + export $(cat /home/.env | xargs) +else + echo "No .env file found" + healthy=false fi if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then