From 0d532221d14c9e8f0e4315b10a18f3d0dbf94e4e Mon Sep 17 00:00:00 2001 From: "James Z.M. Gao" Date: Wed, 4 May 2016 05:14:13 +0800 Subject: add support for secure ports --- content/opt/davmail/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'content/opt') diff --git a/content/opt/davmail/entrypoint.sh b/content/opt/davmail/entrypoint.sh index 7b3b518..6555503 100755 --- a/content/opt/davmail/entrypoint.sh +++ b/content/opt/davmail/entrypoint.sh @@ -13,6 +13,15 @@ elif [ -n "$DAVMAIL_URL" ]; then done < /etc/davmail/davmail.properties.template > $CONFIG fi +if [ -n "$DAVMAIL_SSL_PASS" ]; then + if [ ! -r /etc/davmail/davmail.p12 ] || [ ! -s /etc/davmail/davmail.p12 ]; then + echo "ERROR: can't read ssl keystore [/etc/davmail/davmail.p12]!" + return 2 + fi +fi + +if [ -z "$DAVMAIL_SSL_PASS" ] || [ ! -s /etc/davmail/davmail.p12 ] + if [ -r "$CONFIG" ]; then exec /opt/davmail/davmail.sh "$CONFIG" else -- cgit v1.2.3