16 lines
541 B
Bash
Executable File
16 lines
541 B
Bash
Executable File
#!/bin/sh
|
|
set -ev
|
|
|
|
# Configure OpenMapKit
|
|
export OPENMAPKIT_ADMIN_USER="admin"
|
|
export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
|
mkdir -p /srv/openmapkit/omk_conf
|
|
chown -R 108080:108080 /srv/openmapkit/omk_conf
|
|
envsubst <omk_conf/settings.js >/srv/openmapkit/omk_conf/settings.js
|
|
|
|
# Copy existing files into persistent storage
|
|
lxchelper extract openmapkit /srv/openmapkit/data /srv/openmapkit/omk_data
|
|
|
|
# Register application
|
|
vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
|