Files
2024-04-18 15:58:43 -04:00

33 lines
854 B
Plaintext
Executable File
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/s6-overlay/s6-rc.d
###
# 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
lsiown -R abc:abc \
/config/nginx/{proxy.conf,ssl.conf,dhparams.pem,proxy-confs/}