summaryrefslogtreecommitdiff
path: root/sentinel-proxy/files/sentinel-reload.sh
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-09-23 11:42:19 +0200
committerKarel Kočí <cynerd@email.cz>2020-09-23 11:43:02 +0200
commit5fee4bd515d55cb1ded1bed0c34fb89c22e01a87 (patch)
tree0718445739237630d35330ac3ac5c3cc11979daa /sentinel-proxy/files/sentinel-reload.sh
parentbf24e13ee81a77aa39e2af11f4a778c7bef39f0b (diff)
downloadopenwrt-personal-pkgs-5fee4bd515d55cb1ded1bed0c34fb89c22e01a87.tar.gz
openwrt-personal-pkgs-5fee4bd515d55cb1ded1bed0c34fb89c22e01a87.tar.bz2
openwrt-personal-pkgs-5fee4bd515d55cb1ded1bed0c34fb89c22e01a87.zip
sentinel-proxy: try newer version
Diffstat (limited to 'sentinel-proxy/files/sentinel-reload.sh')
-rwxr-xr-xsentinel-proxy/files/sentinel-reload.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/sentinel-proxy/files/sentinel-reload.sh b/sentinel-proxy/files/sentinel-reload.sh
new file mode 100755
index 0000000..f21eceb
--- /dev/null
+++ b/sentinel-proxy/files/sentinel-reload.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Reload all sentinel components to apply the newest configuration.
+# The reload is done by running scripts located in HOOKS_DIR
+
+HOOKS_DIR="/usr/libexec/sentinel/reload_hooks.d/"
+
+if ! [ -d "${HOOKS_DIR}" ]; then
+ echo "Failed to reload Sentinel: hooks dir does not exist" >&2
+ return 1
+fi
+
+for reload_script in "${HOOKS_DIR}"/*; do
+ [ -x "${reload_script}" ] || continue
+ "${reload_script}"
+done