core-agent-linux/network/30-qubes-external-ip
2017-09-30 04:43:04 +02:00

9 lines
213 B
Bash
Executable File

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