File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
s6-overlay/s6-rc.d/svc-mod-swag-auto-reload Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22# shellcheck shell=bash
33
4+ echo "MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):"
5+ echo "/config/nginx"
6+ ACTIVE_WATCH=("/config/nginx")
7+ for i in $(echo "${WATCHLIST}" | tr "|" " "); do
8+ if [ -f "${i}" ] || [ -d "${i}" ]; then
9+ echo "${i}"
10+ ACTIVE_WATCH+=("${i}")
11+ fi
12+ done
13+
414function wait_for_changes {
515 inotifywait -rq \
616 --event modify,move,create,delete \
717 --excludei '\.(sample|md)' \
8- "/config/nginx "
18+ "${ACTIVE_WATCH[@]} "
919}
1020
1121while wait_for_changes; do
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22# shellcheck shell=bash
33
4+ echo "MOD Auto-reload: Watching the following files/folders for changes (excluding .sample and .md files):"
5+ echo "/config/nginx"
6+ ACTIVE_WATCH=("/config/nginx")
7+ for i in $(echo "${WATCHLIST}" | tr "|" " "); do
8+ if [ -f "${i}" ] || [ -d "${i}" ]; then
9+ echo "${i}"
10+ ACTIVE_WATCH+=("${i}")
11+ fi
12+ done
13+
414function wait_for_changes {
515 inotifywait -rq \
616 --event modify,move,create,delete \
717 --excludei '\.(sample|md)' \
8- "/config/nginx "
18+ "${ACTIVE_WATCH[@]} "
919}
1020
1121while wait_for_changes; do
You can’t perform that action at this time.
0 commit comments