aredn/files/etc/uci-defaults/90_aredn_default_tunnels

12 lines
448 B
Bash
Executable File

#!/bin/sh
if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0])" != "tunnel" ]; then
/sbin/uci -c /etc/config.mesh -q add aredn tunnel
/sbin/uci -c /etc/config.mesh -q commit aredn
fi
# Default tunnel weight to 1 (perfect RF)
if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@tunnel[0].weight)" = "" ]; then
/sbin/uci -c /etc/config.mesh -q set aredn.@tunnel[0].weight=1
/sbin/uci -c /etc/config.mesh -q commit aredn
fi