25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00
xmpp.chapril.org-ejabberd/docker/pre/03_make_dhparam.sh
2016-11-16 11:48:50 +01:00

23 lines
473 B
Bash
Executable File

#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
make_dhparam() {
local dhfile=$1
local bits=$2
log "Writing dh file to '${dhfile}'..."
openssl dhparam -out ${dhfile} ${bits}
}
if is_true ${EJABBERD_DHPARAM} ; then
file_exist ${SSLDHPARAM} \
|| make_dhparam ${SSLDHPARAM} 4096
fi
exit 0