Spotter-VM/lxc-apps/opendatakit/install/update-conf.sh

16 lines
449 B
Bash
Raw Normal View History

#!/bin/sh
# Volumes
ODK_CONF="${VOLUMES_DIR}/opendatakit/odk_conf"
ODKBUILD_CONF="${VOLUMES_DIR}/opendatakit/odkbuild_conf"
# Replacements
sed -i "s|\(^\s\+proxyName=\).*|\1\"${HOST}\"|" ${ODK_CONF}/server.xml
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" ${ODK_CONF}/server.xml
sed -i "s|\(^security\.server\.securePort=\).*|\1${PORT}|" ${ODK_CONF}/security.properties
cat <<EOF >${ODKBUILD_CONF}/add-ca-cert.env
HOST=${HOST}
PORT=${PORT}
EOF