Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/ns-ha/files/800-adblock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

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

set_service_name adblock

Expand All @@ -11,6 +12,10 @@ add_sync_file /etc/config/adblock
if [ "$ACTION" == "NOTIFY_SYNC" ]; then
home=$(get_rsync_user_home)
rsync -avr $home/etc/adblock/ /etc/adblock/
elif [ "$ACTION" == "NOTIFY_BACKUP" ]; then
update_cron "disable" "adblock"
elif [ "$ACTION" == "NOTIFY_MASTER" ]; then
update_cron "enable" "adblock"
fi

keepalived_hotplug
Loading