unifios-utilities/ipt-enable-logs/scripts/refresh-iptables.sh
Pedro Pombeiro 9967161b80
ipt-enable-logs (#267)
* Add some more on_boot..d examples

* Add ipt-enable-logs
2021-11-16 22:07:24 -08:00

14 lines
316 B
Bash
Executable File

#!/bin/sh
set -e
if [ -f /mnt/data/on_boot.d/10-dns.sh ]; then
if ! iptables-save | grep -e '\-A PREROUTING.* \--log-prefix "\[' > /dev/null; then
/mnt/data/on_boot.d/10-dns.sh
else
echo "iptables already contains DNAT log prefixes, ignoring."
fi
fi
/mnt/data/on_boot.d/30-ipt-enable-logs-launch.sh