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
|
|
|
|
2018-10-26 15:02:11 +02:00
|
|
|
cd $(realpath $(dirname "${0}"))/install
|
2018-04-21 23:10:55 +02:00
|
|
|
|
|
|
|
# Configure OpenMapKit
|
|
|
|
export OPENMAPKIT_ADMIN_USER="admin"
|
|
|
|
export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
|
|
|
mkdir -p /srv/openmapkit/conf /srv/openmapkit/data
|
|
|
|
chown -R 8007:8007 /srv/openmapkit/data
|
2018-09-13 21:54:36 +02:00
|
|
|
cp -rp /var/lib/lxc/openmapkit/openmapkit/srv/openmapkit/data/. /srv/openmapkit/data
|
2018-10-25 22:22:36 +02:00
|
|
|
envsubst <srv/openmapkit/conf/settings.js >/srv/openmapkit/conf/settings.js
|
2018-09-04 21:42:26 +02:00
|
|
|
vmmgr update-login openmapkit "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
|
2018-09-13 21:54:36 +02:00
|
|
|
|
|
|
|
# Install service
|
2018-10-25 22:22:36 +02:00
|
|
|
cp etc/init.d/openmapkit /etc/init.d/openmapkit
|
2018-09-13 21:54:36 +02:00
|
|
|
rc-update -u
|