#!/bin/sh # Dawnline tunnels: log starts and stops to the service log, and load devices # whenever netifd (re)creates one. case "$ACTION" in ifup|ifdown|ifup-failed) ;; *) exit 0 ;; esac [ -n "$(uci -q get "network.$INTERFACE._dawnline")" ] || exit 0 # In order (a quick down/up must not log up first). /usr/bin/dawnline iface-event "$ACTION" "$INTERFACE" >/dev/null 2>&1 # A disabled Dawnline leaves the tunnels empty: nothing would enforce end # dates or limits once the devices were loaded. [ "$ACTION" = ifup ] && /etc/init.d/dawnline enabled && /usr/bin/dawnline sync >/dev/null 2>&1 & exit 0