mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-28 11:13:00 -04:00
33 lines
855 B
Plaintext
33 lines
855 B
Plaintext
#!/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/}
|