Make FrontlineSMS SPOC-compatible

This commit is contained in:
Disassembler 2020-03-17 10:53:26 +01:00
parent 5782083921
commit 0455738fa8
Signed by: Disassembler
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": { "meta": {
"title": "FrontlineSMS", "title": "FrontlineSMS",
"desc-cs": "Hromadné odesílání zpráv", "desc-cs": "Hromadné odesílání zpráv",
@ -8,10 +8,10 @@
}, },
"containers": { "containers": {
"frontlinesms": { "frontlinesms": {
"image": "frontlinesms_2.6.5-190620", "image": "frontlinesms_2.6.5-200313",
"mounts": [ "mounts": {
["DIR", "/srv/frontlinesms/flsms_data", "/srv/frontlinesms/.frontlinesms2"] "frontlinesms/flsms_data": "/srv/frontlinesms/.frontlinesms2"
] }
} }
} }
} }

View File

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

View File

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

View File

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