comparison docker_legacy/prosody/scripts/prosody @ 164:29873a41aae1

docker: new docker files are now in sat main repos, this one is legacy
author Goffi <goffi@goffi.org>
date Fri, 01 Jan 2021 18:33:52 +0100
parents
children
comparison
equal deleted inserted replaced
163:a63f6d360326 164:29873a41aae1
1 #!/bin/sh
2 # the following script is used to automatically generate passwords for components and certificate
3 export SAT_PUBSUB_SECRET=$(apg -n 1)
4 export SAT_SALUT_SECRET=$(apg -n 1)
5
6 if [ -z $DOMAIN ]; then
7 export DOMAIN="libervia.int"
8 fi
9
10 container_server&
11
12 echo "domain used: $DOMAIN\n"
13
14 if [ ! -f "/usr/share/sat/certificates/libervia.key" -o ! -f "/usr/share/sat/certificates/libervia.crt" ]; then
15 echo "No certificate found, we generate one"
16 openssl req -new -x509 -days 1825 -nodes -out "/usr/share/sat/certificates/libervia.crt"\
17 -newkey rsa:4096 -keyout "/usr/share/sat/certificates/libervia.key" -subj "/C=AU/CN=$DOMAIN"
18 fi
19 exec /usr/bin/prosody "$@"