2018-04-21 23:10:55 +02:00
|
|
|
#!/bin/sh
|
2018-10-28 16:04:11 +01:00
|
|
|
set -ev
|
2018-04-21 23:10:55 +02:00
|
|
|
|
|
|
|
# Configure OpenMapKit
|
|
|
|
export OPENMAPKIT_ADMIN_USER="admin"
|
2019-06-05 18:55:15 +02:00
|
|
|
export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
2019-10-05 15:07:53 +02:00
|
|
|
mkdir -p /srv/openmapkit/omk_conf /srv/openmapkit/omk_data
|
2019-11-18 22:12:01 +01:00
|
|
|
chown -R 108080:108080 /srv/openmapkit/omk_conf /srv/openmapkit/omk_data
|
2019-10-05 15:07:53 +02:00
|
|
|
lxc-execute openmapkit -- tar -cC /srv/openmapkit/data . | tar -xC /srv/openmapkit/omk_data
|
|
|
|
envsubst <omk_conf/settings.js >/srv/openmapkit/omk_conf/settings.js
|
2018-10-28 19:50:35 +01:00
|
|
|
|
2018-11-03 15:53:51 +01:00
|
|
|
# Register application
|
2019-02-26 21:12:41 +01:00
|
|
|
vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
|