From 3a424c572699356c9da1e5adddad9a4f97279077 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 26 Feb 2019 21:08:42 +0100 Subject: [PATCH] Use lxc start/stop commands in install script instead of service --- mifosx/install.sh | 5 +++-- motech/install.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mifosx/install.sh b/mifosx/install.sh index ad5b060..73daf99 100755 --- a/mifosx/install.sh +++ b/mifosx/install.sh @@ -25,12 +25,13 @@ rc-update -u # Populate database >/var/log/lxc/mifosx.log -service mifosx start +lxc-start mifosx until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/mifosx.log; do sleep 1 done -service mifosx stop +lxc-stop mifosx # Fix missing previous_run_status column +# TODO: Remove? #echo 'ALTER TABLE `scheduled_email_campaign` ADD `previous_run_status` VARCHAR(10) NULL;' | lxc-attach mariadb -- mysql mifostenant-default # Update admin account diff --git a/motech/install.sh b/motech/install.sh index 4b92bf5..4fe7bc2 100755 --- a/motech/install.sh +++ b/motech/install.sh @@ -24,7 +24,7 @@ cp etc/init.d/motech /etc/init.d/motech rc-update -u # Populate database and create admin account -service motech start +lxc-start motech until curl -s "http://motech:8080/module/server/startup/" | grep -q adminLogin; do sleep 1 done @@ -32,7 +32,7 @@ export MOTECH_ADMIN_USER="admin" export MOTECH_ADMIN_EMAIL="admin@example.com" export MOTECH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_ADMIN_USER}\",\"adminEmail\":\"${MOTECH_ADMIN_EMAIL}\",\"adminPassword\":\"${MOTECH_ADMIN_PWD}\",\"adminConfirmPassword\":\"${MOTECH_ADMIN_PWD}\",\"language\":\"cs\",\"providerName\":\"\",\"providerUrl\":\"\",\"schedulerUrl\":\"\"}" http://motech:8080/module/server/startup/ -service motech stop +lxc-stop motech # Install config update script cp srv/motech/update-conf.sh /srv/motech/update-conf.sh