gluon/package/gluon-respondd/files/etc/hotplug.d/iface/10-gluon-respondd
Jan-Philipp Litza 680a18035d Rename /lib/gluon/respondd/ to /lib/respondd/
respondd is supposed to be non-Gluon-specific (it is in the packages
repository), thus having its data direectory in /lib/gluon/ doesn't make sense.
2016-12-08 23:21:55 +01:00

17 lines
305 B
Bash

#!/bin/sh
. /lib/functions/service.sh
ifname_to_dev () {
ifstatus client "$1"|jsonfilter -e "@.device"
}
case "$ACTION" in
ifup)
DEVICE="$(ifname_to_dev "$INTERFACE")"
[ "$DEVICE" != "$(cat /lib/respondd/client.dev 2>/dev/null)" ] ||
/etc/init.d/gluon-respondd restart_if_running &
;;
esac