#!/bin/sh

. /lib/functions/keepalived/hotplug.sh
. /lib/functions/keepalived/ns.sh

set_service_name acme

set_restart_if_master
set_stop_if_backup

if [ "$ACTION" == "NOTIFY_BACKUP" ]; then
    update_cron "disable" "acme"
elif [ "$ACTION" == "NOTIFY_MASTER" ]; then
    update_cron "enable" "acme"
fi

keepalived_hotplug
