mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-01-24 00:31:58 +08:00
Merge pull request #458 from linuxserver/swag-auto-proxy-s6v3
switch to hybrid (swag-auto-proxy)
This commit is contained in:
commit
4d921898ee
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/finish
|
||||
4
root/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/finish
Executable file
4
root/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/finish
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
sed -i '/\/app\/auto-proxy.sh/d' /config/crontabs/root
|
||||
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf
|
||||
19
root/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/run
Executable file
19
root/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/run
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ ! -S /var/run/docker.sock ] && [ -z "$DOCKER_HOST" ]; then
|
||||
echo "**** Docker mod not set up properly, skipping SWAG auto-proxy ****"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf
|
||||
sed -i 's|#include /etc/nginx/http.d|include /etc/nginx/http.d|' /config/nginx/nginx.conf
|
||||
cp /defaults/auto-proxy-readme /etc/nginx/http.d/auto-proxy-readme
|
||||
rm -rf /auto-proxy
|
||||
mkdir /auto-proxy
|
||||
|
||||
if ! grep -q "/app/auto-proxy.sh" /config/crontabs/root; then
|
||||
echo "* * * * * /app/auto-proxy.sh" >> /config/crontabs/root
|
||||
cp /config/crontabs/root /etc/crontabs/root
|
||||
fi
|
||||
|
||||
/app/auto-proxy.sh
|
||||
@ -0,0 +1 @@
|
||||
oneshot
|
||||
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/run
|
||||
Loading…
x
Reference in New Issue
Block a user