Use lxc start/stop commands in install script instead of service
This commit is contained in:
parent
3f6a74b5bd
commit
3a424c5726
@ -25,12 +25,13 @@ rc-update -u
|
|||||||
|
|
||||||
# Populate database
|
# Populate database
|
||||||
>/var/log/lxc/mifosx.log
|
>/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
|
until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/mifosx.log; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
service mifosx stop
|
lxc-stop mifosx
|
||||||
# Fix missing previous_run_status column
|
# 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
|
#echo 'ALTER TABLE `scheduled_email_campaign` ADD `previous_run_status` VARCHAR(10) NULL;' | lxc-attach mariadb -- mysql mifostenant-default
|
||||||
|
|
||||||
# Update admin account
|
# Update admin account
|
||||||
|
@ -24,7 +24,7 @@ cp etc/init.d/motech /etc/init.d/motech
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Populate database and create admin account
|
# 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
|
until curl -s "http://motech:8080/module/server/startup/" | grep -q adminLogin; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
@ -32,7 +32,7 @@ export MOTECH_ADMIN_USER="admin"
|
|||||||
export MOTECH_ADMIN_EMAIL="admin@example.com"
|
export MOTECH_ADMIN_EMAIL="admin@example.com"
|
||||||
export MOTECH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
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/
|
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
|
# Install config update script
|
||||||
cp srv/motech/update-conf.sh /srv/motech/update-conf.sh
|
cp srv/motech/update-conf.sh /srv/motech/update-conf.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user