1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-21 13:23:09 +00:00

make it possible to install additional packages at runtime and not only during build

Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
Felix Bartels
2018-11-01 08:37:50 +01:00
parent 2043b94062
commit c8096b9a8f
3 changed files with 20 additions and 1 deletions
+9
View File
@@ -1,5 +1,7 @@
#!/bin/bash
ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
set -eu # unset variables are errors & non-zero return values exit the whole script
if [ ! -e /kopano/$SERVICE_TO_START.py ]
@@ -8,6 +10,13 @@ then
exit 1
fi
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && apt update
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && for installpkg in "$ADDITIONAL_KOPANO_PACKAGES"; do
if [ $(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
apt --assume-yes install $installpkg;
fi
done
mkdir -p /kopano/data/attachments /tmp/$SERVICE_TO_START /var/run/kopano
echo "Configure core service '$SERVICE_TO_START'" | ts