Make FrontlineSMS SPOC-compatible

This commit is contained in:
Disassembler 2020-03-17 10:53:26 +01:00
parent 5782083921
commit 0455738fa8
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
10 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,5 @@
{
"version": "2.6.5-190620",
"version": "2.6.5-200313",
"meta": {
"title": "FrontlineSMS",
"desc-cs": "Hromadné odesílání zpráv",
@ -8,10 +8,10 @@
},
"containers": {
"frontlinesms": {
"image": "frontlinesms_2.6.5-190620",
"mounts": [
["DIR", "/srv/frontlinesms/flsms_data", "/srv/frontlinesms/.frontlinesms2"]
]
"image": "frontlinesms_2.6.5-200313",
"mounts": {
"frontlinesms/flsms_data": "/srv/frontlinesms/.frontlinesms2"
}
}
}
}

View File

@ -1,5 +1,5 @@
IMAGE frontlinesms_2.6.5-190620
FROM alpine3.9-java8_8.212.04-190620
IMAGE frontlinesms_2.6.5-200313
FROM alpine3.11-java8_8.242.08-200313
RUN EOF
# Install runtime dependencies
@ -24,7 +24,7 @@ RUN EOF
rm /tmp/frontlinesms2.sh
EOF
COPY lxc
COPY image.d
RUN EOF
# Install Czech translation

View File

@ -1,14 +1,16 @@
#!/bin/sh
set -ev
# Volumes
FLSMS_DATA="${VOLUMES_DIR}/frontlinesms/flsms_data"
# Configure FrontlineSMS
mkdir -p /srv/frontlinesms/flsms_data
install -o 108080 -g 108080 -m 750 -d ${FLSMS_DATA}
export FRONTLINESMS_ADMIN_USER="admin"
export FRONTLINESMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
export FRONTLINESMS_ADMIN_USER_HASH=$(echo -n "${FRONTLINESMS_ADMIN_USER}" | base64)
export FRONTLINESMS_ADMIN_PWD_HASH=$(echo -n "${FRONTLINESMS_ADMIN_PWD}" | base64)
envsubst <flsms_data/app-settings.properties >/srv/frontlinesms/flsms_data/app-settings.properties
chown -R 8080:8080 /srv/frontlinesms/flsms_data
envsubst <flsms_data/app-settings.properties | install -o 108080 -g 108080 -m 640 /dev/stdin ${FLSMS_DATA}/app-settings.properties
# Register application
vmmgr register-app frontlinesms sms "${FRONTLINESMS_ADMIN_USER}" "${FRONTLINESMS_ADMIN_PWD}"

View File

@ -2,7 +2,7 @@
set -ev
# Remove persistent data
rm -rf /srv/frontlinesms
rm -rf "${VOLUMES_DIR}/frontlinesms"
# Unregister application
vmmgr unregister-app frontlinesms