* add button for languages setting * build a web module for the dashboard - load all python module from local dir - initialize Blueprint and Babel * set a default key for secure cookies * add translations to docker container * improve translation build - clean target erases the *.pot - don't modify the resurt of url_for() calls - don't translate the language description * translate connection table, fix icon * build relative urls for HA ingress * fix unit test, increase coverage
30 lines
907 B
Bash
30 lines
907 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
user="$(id -u)"
|
|
export VERSION=$(cat /proxy-version.txt)
|
|
|
|
echo "######################################################"
|
|
echo "# prepare: '$SERVICE_NAME' Version:$VERSION"
|
|
echo "# for running with UserID:$UID, GroupID:$GID"
|
|
echo "# Image built: $(cat /build-date.txt) "
|
|
echo "#"
|
|
|
|
if [ "$user" = '0' ]; then
|
|
mkdir -p /home/$SERVICE_NAME/log /home/$SERVICE_NAME/config
|
|
|
|
if ! id $SERVICE_NAME &> /dev/null; then
|
|
echo "# create user"
|
|
addgroup --gid $GID $SERVICE_NAME 2> /dev/null
|
|
adduser -G $SERVICE_NAME -s /bin/false -D -H -g "" -u $UID $SERVICE_NAME
|
|
chown -R $SERVICE_NAME:$SERVICE_NAME /home/$SERVICE_NAME || true
|
|
rm -fr /usr/sbin/addgroup /usr/sbin/adduser /bin/chown
|
|
fi
|
|
echo "######################################################"
|
|
echo "#"
|
|
|
|
exec su-exec $SERVICE_NAME "$@" -tr './translations/'
|
|
else
|
|
exec "$@"
|
|
fi
|