core-agent-linux/network/30-qubes-external-ip

9 lines
207 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