aboutsummaryrefslogtreecommitdiff
path: root/net/nft-qos/files/nft-qos-monitor.hotplug
blob: 5868bb1ea0b006a1ea66e2be09d3b28a28ccc09c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# Copyright 2018 rosysong@rosinson.com
#

export initscript="nft-qos-monitor"

. /lib/nft-qos/monitor.sh

logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"

case "$ACTION" in
	add | update)
		qosdef_init_env
		qosdef_init_monitor
		qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME
	;;
	remove)
		qosdef_init_env
		qosdef_init_monitor
		qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME
	;;
esac