Skip to content

Commit 0fdef6e

Browse files
committed
switch to hybrid
1 parent 4e623d5 commit 0fdef6e

File tree

6 files changed

+21
-0
lines changed

6 files changed

+21
-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: 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)