10-gluon-respondd 311 B

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