2021-10-14 14:01:48 -05:00
|
|
|
|
#!/usr/bin/with-contenv bash
|
2022-11-22 20:55:25 +00:00
|
|
|
|
# shellcheck shell=bash
|
2021-10-14 14:01:48 -05:00
|
|
|
|
|
|
|
|
|
# copy default config files if they don't exist
|
|
|
|
|
if [[ ! -f /config/nginx/proxy.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/proxy.conf.sample /config/nginx/proxy.conf
|
|
|
|
|
fi
|
2022-09-08 12:07:12 -05:00
|
|
|
|
|
|
|
|
|
# copy authelia config files if they don't exist
|
|
|
|
|
if [[ ! -f /config/nginx/authelia-location.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/authelia-location.conf.sample /config/nginx/authelia-location.conf
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -f /config/nginx/authelia-server.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/authelia-server.conf.sample /config/nginx/authelia-server.conf
|
|
|
|
|
fi
|
|
|
|
|
|
2023-02-05 12:05:18 -06:00
|
|
|
|
# copy authentik config files if they don't exist
|
|
|
|
|
if [[ ! -f /config/nginx/authentik-location.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/authentik-location.conf.sample /config/nginx/authentik-location.conf
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -f /config/nginx/authentik-server.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/authentik-server.conf.sample /config/nginx/authentik-server.conf
|
|
|
|
|
fi
|
|
|
|
|
|
2022-09-08 12:07:12 -05:00
|
|
|
|
# copy old ldap config file to new location
|
|
|
|
|
if [[ -f /config/nginx/ldap.conf ]] && [[ ! -f /config/nginx/ldap-server.conf ]]; then
|
|
|
|
|
cp /config/nginx/ldap.conf /config/nginx/ldap-server.conf
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# copy ldap config files if they don't exist
|
|
|
|
|
if [[ ! -f /config/nginx/ldap-location.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/ldap-location.conf.sample /config/nginx/ldap-location.conf
|
|
|
|
|
fi
|
|
|
|
|
if [[ ! -f /config/nginx/ldap-server.conf ]]; then
|
|
|
|
|
cp /defaults/nginx/ldap-server.conf.sample /config/nginx/ldap-server.conf
|
|
|
|
|
fi
|