miniupnpd.init.d.script: support nftables

fixes #594
This commit is contained in:
Thomas Bernard 2022-02-19 23:49:18 +01:00
parent 89c6556338
commit c8476e6f16
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
3 changed files with 16 additions and 8 deletions

View File

@ -1,8 +1,9 @@
$Id: Changelog.txt,v 1.486 2022/02/19 19:15:24 nanard Exp $
$Id: Changelog.txt,v 1.487 2022/02/19 22:45:06 nanard Exp $
2022/02/19:
prefer non-reserved over reserved addresses in getifaddr()
pf: use external IP for NAT in double NAT setups
miniupnpd.init.d.script: support nftables
VERSION 2.3.0 : released on 2022/01/23

View File

@ -1,5 +1,5 @@
# MiniUPnP project
# (c) 2018-2021 Thomas Bernard
# (c) 2018-2022 Thomas Bernard
# (c) 2015 Tomofumi Hayashi
# http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
# Author : Tomofumi Hayashi
@ -129,6 +129,7 @@ install: miniupnpd $(SRCDIR)/miniupnpd.8 $(SRCDIR)/miniupnpd.conf \
$(INSTALL) $(SRCDIR)/netfilter_nft/scripts/nft_removeall.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) $(SRCDIR)/netfilter_nft/scripts/nft_flush.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) $(SRCDIR)/netfilter_nft/scripts/nft_delete_chain.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) $(SRCDIR)/netfilter_nft/scripts/miniupnpd_functions.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) --mode=0644 -b $(SRCDIR)/miniupnpd.conf $(DESTDIR)$(ETCINSTALLDIR)
sed -i -e "s/^uuid=[-0-9a-f]*/uuid=$(UUID)/" $(DESTDIR)$(ETCINSTALLDIR)/miniupnpd.conf
$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/init.d

View File

@ -1,8 +1,8 @@
#!/bin/sh
# $Id: miniupnpd.init.d.script,v 1.2 2007/09/23 16:11:12 nanard Exp $
# $Id: miniupnpd.init.d.script,v 1.4 2022/02/19 22:45:06 nanard Exp $
# MiniUPnP project
# author: Thomas Bernard
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
# website: http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
### BEGIN INIT INFO
# Provides: miniupnpd
@ -15,11 +15,17 @@
set -e
ETCPATH=/etc/miniupnpd
MINIUPNPD=/usr/sbin/miniupnpd
ARGS='-f /etc/miniupnpd/miniupnpd.conf'
ARGS="-f $ETCPATH/miniupnpd.conf"
IPTABLES_CREATE=/etc/miniupnpd/iptables_init.sh
IPTABLES_REMOVE=/etc/miniupnpd/iptables_removeall.sh
if [ -f $ETCPATH/nft_init.sh ] ; then
IPTABLES_CREATE=$ETCPATH/nft_init.sh
IPTABLES_REMOVE=$ETCPATH/nft_removeall.sh
else
IPTABLES_CREATE=$ETCPATH/iptables_init.sh
IPTABLES_REMOVE=$ETCPATH/iptables_removeall.sh
fi
test -f $MINIUPNPD || exit 0
@ -47,7 +53,7 @@ case "$1" in
log_end_msg $?
;;
status)
status_of_proc /usr/sbin/miniupnpd miniupnpd
status_of_proc $MINIUPNPD miniupnpd
;;
*)
log_action_msg "Usage: /etc/init.d/miniupnpd {start|stop|restart|reload|force-reload}"