#!/bin/bash

# Run scripts in /etc/redis/notify.d when Redis Sentinel notices
# configuration change.


set -o nounset -o pipefail -o errexit

event_type="${1}"
event_desc="${2}"

if [ -d /etc/redis/notify.d ] ; then
    run-parts \
        --arg="${event_type}" \
        --arg="${event_desc}" \
        /etc/redis/notify.d
fi
