summaryrefslogtreecommitdiff
path: root/sentinel-proxy/files/sentinel-reload.sh
blob: f21eceb80d3430f42078c0e9aa0b3d98d94aebbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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