unifios-utilities/ipt-enable-logs/on_boot.d/30-ipt-enable-logs-launch.sh

10 lines
232 B
Bash
Raw Normal View History

#!/bin/sh
set -e
if ! iptables-save | grep -e '\-A UBIOS_.* \--log-prefix "\[' > /dev/null; then
/mnt/data/scripts/ipt-enable-logs.sh | iptables-restore -c
else
echo "iptables already contains USER log prefixes, ignoring."
fi