Select Git revision
compose_files_conf.sh
setup.sh 2.00 KiB
#!/bin/bash
source config.sh
# Remove all existing repositories
# and configurations.
function remove_all_configs() {
echo "Removing all previous configs..."
git clean -fd
git pull
rm -rf $MUMBLE_DIR $JITSI_DIR $NOVNC_DIR
echo "Removed all repositories."
}
# Clone repositories
function clone_repositories() {
git clone $LETSENCRYPT_URL
git clone $JITSI_URL
git clone $NOVNC_URL
git clone $MUMBLE_URL
wait
}
function configure_letsencrypt() {
echo ""
echo "Setting your letsencrypt domain settings."
echo ""
le_compose=$LETSENCRYPT_DIR/docker-compose.yml
# Adds your domain to docker-compose
sed -i "s/your-domain.com/$DOMAIN/" $le_compose
# Adds the list of subdomains to use to docker-compose
sed -i "s/your_subdomains/$SUB_DOMAINS/" $le_compose
# Add E-Mail address that will be used to notify you
# about for example expiring certificates.
sed -i "s/your_email/$MAIL/" $le_compose
# For using not only your subdomains uncomment the following line.
# sed -i "s/- ONLY_SUBDOMAINS=true/- ONLY_SUBDOMAINS=false/" $LETSENCRYPT_DIR
# start once to generate directories and certificates
docker-compose $base_compose_file $letsencrypt_compose_file up -d && docker logs reverse_proxy && docker-compose $base_compose_file $letsencrypt_compose_file down
echo ""
echo "Done configuring LetsEncrypt and generating certificates."
}
## Configure Murmur (mumble server) and mumble-web
#
function configure_mumble() {
cd $MUMBLE_DIR
git clone https://github.com/Johni0702/mumble-web.git
cd ..
mkdir murmur
cp $MUMBLE_DIR/murmur/mumble-server.ini murmur/mumble-server.ini
touch murmur/mumble-server.log
}
## Run configuration
#
echo ""
echo "Starting configuration with cleaning up and pulling again."
echo ""
./tools/stop_containers.sh
remove_all_configs
clone_repositories
configure_letsencrypt
if [ "$USE_MUMBLE" == "true" ];then
configure_mumble
fi
./tools/stop_containers.sh
./tools/update_containers.sh