1
0
This repository has been archived on 2025-01-10. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Anderson Luiz Alves 0464e230c1 stock 103961
2017-07-30 16:48:04 -03:00

25 lines
470 B
Bash
Executable File

#!/bin/sh
# Called on ip-up event on a LAN interface
# $LANID= LAN connection index
restart_miniupnp() {
[ ! -f /var/bewan/miniupnp.d/lan-interfaces ] && return 1
local interfaces=`cat /var/bewan/miniupnp.d/lan-interfaces`
# Restart if interface is in list
local ok=0
local ix
for ix in `strip $interfaces`; do
if [ "$ix" = "${LANID:-0}" ]; then
ok=1
fi
done
[ $ok = 0 ] && return 1
local ARG=restart
base_call_initd 'miniupnpd'
}
restart_miniupnp