#!/bin/sh /etc/rc.common START=90 tunnel_id=1 config_cb() { local cfg="$CONFIG_SECTION" config_get configname "$cfg" TYPE case "$configname" in broker) config_get addresses "$cfg" address config_get uuid "$cfg" uuid config_get interface "$cfg" interface local broker_opts="" for address in $addresses; do broker_opts="${broker_opts} -b ${address}" done /usr/bin/tunneldigger -u ${uuid} -i ${interface} -t ${tunnel_id} ${broker_opts} & let tunnel_id++ ;; esac } start() { config_load tunneldigger } stop() { killall tunneldigger }