Files
docker-mods-uptime-kuma-tim…/root/etc/cont-init.d/99-proxy-conf
T
2022-09-02 17:48:29 +00:00

33 lines
855 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
###
# SWAG LOGIC https://github.com/linuxserver/docker-swag/blob/master/root/etc/cont-init.d/50-config
###
# make our folders and links
mkdir -p \
/config/nginx/proxy-confs
# samples are removed on init by the nginx base
# copy new samples
if [[ -d /defaults/nginx/proxy-confs/ ]]; then
find /defaults/nginx/proxy-confs/ \
-maxdepth 1 \
-name "*.conf.sample" \
-type f \
-exec cp "{}" /config/nginx/proxy-confs/ +
fi
# copy reverse proxy configs
cp -R /defaults/nginx/proxy-confs /config/nginx/
# 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
# permissions
chown -R abc:abc \
/config/nginx/{proxy.conf,ssl.conf,dhparams.pem,proxy-confs/}