diff --git a/extra/traefik-host-based-routing/start.sh b/extra/traefik-host-based-routing/start.sh index 5182dad..ce98ea5 100755 --- a/extra/traefik-host-based-routing/start.sh +++ b/extra/traefik-host-based-routing/start.sh @@ -13,7 +13,13 @@ REFRESH=false # Default configuration (override via .env) ENABLE_CIFS="${ENABLE_CIFS:-0}" -# Load environment variables if .env exists +# Create .env from example if missing +if [[ ! -f .env ]] && [[ -f .env.example ]]; then + cp .env.example .env + echo "Created .env from .env.example" +fi + +# Load environment variables if [[ -f .env ]]; then source .env fi diff --git a/extra/traefik-host-based-routing/stop.sh b/extra/traefik-host-based-routing/stop.sh index f4a5920..19fead5 100755 --- a/extra/traefik-host-based-routing/stop.sh +++ b/extra/traefik-host-based-routing/stop.sh @@ -8,7 +8,13 @@ cd "$(dirname "$0")" # Default configuration (override via .env) ENABLE_CIFS="${ENABLE_CIFS:-0}" -# Load environment variables if .env exists +# Create .env from example if missing +if [[ ! -f .env ]] && [[ -f .env.example ]]; then + cp .env.example .env + echo "Created .env from .env.example" +fi + +# Load environment variables if [[ -f .env ]]; then source .env fi