Docker-Guacamole/prepare.sh

20 lines
741 B
Bash

#!/bin/sh
if ! (docker ps >/dev/null 2>&1)
then
echo "Le daemon docker n'est pas en cours d'exécution, sortie !"
exit
fi
echo "Préparation de l'init du dossier et création ./init/initdb.sql"
mkdir ./init >/dev/null 2>&1
mkdir -p ./nginx/ssl >/dev/null 2>&1
chmod -R +x ./init
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgresql > ./init/initdb.sql
# echo " Ok"
# echo "Création de certificats SSL"
# openssl req -nodes -newkey rsa:2048 -new -x509 -keyout nginx/ssl/guacamole_ssl.key -out nginx/ssl/guacamole_ssl.cert -config guacamole_ssl.conf
echo "Vous pouvez utiliser vos propres certificats en plaçant la clé privée dans nginx/ssl/self-ssl.key et le certificat dans nginx/ssl/self.cert."
echo " Ok"