Skip to content

Commit 4d92189

Browse files
authored
Merge pull request #458 from linuxserver/swag-auto-proxy-s6v3
switch to hybrid (swag-auto-proxy)
2 parents 4e623d5 + 54a49fd commit 4d92189

File tree

8 files changed

+26
-0
lines changed

8 files changed

+26
-0
lines changed

root/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/dependencies.d/init-mod-universal-docker-setup

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/finish
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
sed -i '/\/app\/auto-proxy.sh/d' /config/crontabs/root
4+
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
if [ ! -S /var/run/docker.sock ] && [ -z "$DOCKER_HOST" ]; then
4+
echo "**** Docker mod not set up properly, skipping SWAG auto-proxy ****"
5+
exit 0
6+
fi
7+
8+
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf
9+
sed -i 's|#include /etc/nginx/http.d|include /etc/nginx/http.d|' /config/nginx/nginx.conf
10+
cp /defaults/auto-proxy-readme /etc/nginx/http.d/auto-proxy-readme
11+
rm -rf /auto-proxy
12+
mkdir /auto-proxy
13+
14+
if ! grep -q "/app/auto-proxy.sh" /config/crontabs/root; then
15+
echo "* * * * * /app/auto-proxy.sh" >> /config/crontabs/root
16+
cp /config/crontabs/root /etc/crontabs/root
17+
fi
18+
19+
/app/auto-proxy.sh
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oneshot
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/s6-overlay/s6-rc.d/init-mod-swag-auto-proxy-setup/run

root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/init-mod-swag-auto-proxy-setup

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-swag-auto-proxy-setup

Whitespace-only changes.

0 commit comments

Comments
 (0)