This repository has been archived on 2025-06-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
companion-setup/scripts/update_config.sh
2025-04-12 14:29:28 +02:00

12 lines
336 B
Bash
Executable file

#!/bin/bash
cd "$(dirname "$0")/.."
. .env
if [ "$GLUETUN" = true ]; then
export UPSTREAM=gluetun
else
export UPSTREAM=companion
fi
echo -e "# Don't edit this file. Edit the .tmpl file\n\n" > nginx/conf.d/companion.conf
DOMAIN=$DOMAIN envsubst '$DOMAIN,$UPSTREAM' < nginx/conf.d/companion.conf.tmpl >> nginx/conf.d/companion.conf