packages/net/apinger/files/iface.hotplug
Jaymin Patel e4e3206f32 apinger: improve uci and procd support
- convert apinger into procd instances
- generate instance specific apinger.conf from uci
- hotplug handling for apinger alarms
- restart apinger interface instance on ifup action of interface
- don't exit on packet count mismatch, allows to use apinger as monitor
  for multiple targets handling
- add srcip option to target configuration, allows specifying source ip
  used to monitor target
- allow creating status file in script parseable format

Patches are ported against latest version of apinger and referenced from
https://git.pld-linux.org/?p=packages/apinger.git;a=summary

Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
2022-07-12 12:27:05 +05:30

12 lines
204 B
Bash

#!/bin/sh
. /lib/functions.sh
/etc/init.d/apinger enabled && {
[ "$(uci_get apinger $INTERFACE)" == "interface" ] || exit 0
[ "$ACTION" = "ifup" ] && {
/etc/init.d/apinger $INTERFACE restart
}
}