From 4eb5e61ff00fc2fd4c628ce9298cd0cdf714f9a6 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 18 Oct 2019 11:53:29 +0200 Subject: [PATCH] improve iptables backup readability --- zzz_evobackup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zzz_evobackup b/zzz_evobackup index 6b48587..d52db8c 100755 --- a/zzz_evobackup +++ b/zzz_evobackup @@ -268,7 +268,9 @@ if [ "${LOCAL_TASKS}" = "1" ]; then cat ${LOCAL_BACKUP_DIR}/partitions-* > ${LOCAL_BACKUP_DIR}/partitions ## Dump iptables - test -x /sbin/iptables && /sbin/iptables -L -n -v > ${LOCAL_BACKUP_DIR}/iptables.txt && /sbin/iptables -t filter -L -n -v >> ${LOCAL_BACKUP_DIR}/iptables.txt + if [ -x /sbin/iptables ]; then + { /sbin/iptables -L -n -v; /sbin/iptables -t filter -L -n -v; } > ${LOCAL_BACKUP_DIR}/iptables.txt + fi else ## Dump network connections with netstat