mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 12:15:52 +02:00
Drop miniupnpd add-on
As discussed in https://wiki.ipfire.org/devel/telco/2021-05-03. Frankly, if you need or use UPnP, you probably do not even need to _think_ about running a firewall... Signed-off-by: Peter Müller <peter.mueller@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
e55b268a4b
commit
a5ee98176c
@@ -1,69 +0,0 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin $rc_base/init.d/miniupnpd
|
||||
#
|
||||
# Description : Miniupnp daemon
|
||||
#
|
||||
# Authors : Michael Tremer <michael.tremer@ipfire.org>
|
||||
#
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
if [ ! -e /etc/miniupnpd/id ]; then
|
||||
uuidgen > /etc/miniupnpd/id
|
||||
fi
|
||||
|
||||
UUID=$(cat /etc/miniupnpd/id)
|
||||
|
||||
EXT_DEV=$(cat /var/ipfire/red/iface)
|
||||
EXT_IP4=$(cat /var/ipfire/red/local-ipaddress)
|
||||
|
||||
. /var/ipfire/ethernet/settings
|
||||
|
||||
for i in GREEN_ADDRESS BLUE_ADDRESS; do
|
||||
[ -n "${!i}" ] && LISTEN_IP="${LISTEN_IP} -a ${!i}"
|
||||
done
|
||||
|
||||
function flush_iptables() {
|
||||
# Flush iptables to remove all entries that were left
|
||||
iptables -F UPNPFW
|
||||
iptables -t nat -F UPNPFW
|
||||
}
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
boot_mesg "Starting miniupnpd..."
|
||||
|
||||
flush_iptables
|
||||
|
||||
loadproc miniupnpd -f /etc/miniupnpd/miniupnpd.conf \
|
||||
-i ${EXT_DEV} -o ${EXT_IP4} ${LISTEN_IP} \
|
||||
-u ${UUID}
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping miniupnpd..."
|
||||
killproc miniupnpd
|
||||
|
||||
flush_iptables
|
||||
;;
|
||||
|
||||
restart)
|
||||
${0} stop
|
||||
sleep 1
|
||||
${0} start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc miniupnpd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/miniupnpd
|
||||
Reference in New Issue
Block a user