30-qubes-external-ip 213 B

12345678
  1. #!/bin/sh
  2. if [ "x$2" = xup ]; then
  3. INET=$(/sbin/ip addr show dev "$1" | /bin/grep inet)
  4. qubesdb-write /qubes-netvm-external-ip "$INET"
  5. fi
  6. if [ "x$2" = xdown ]; then
  7. qubesdb-write /qubes-netvm-external-ip ""
  8. fi