Create network directory if necessary

This commit is contained in:
Bob Mottram 2018-05-30 20:05:51 +01:00
parent 6e15e2265d
commit 1c654d953b
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ function save_firewall_settings {
iptables-save > /etc/firewall.conf
ip6tables-save > /etc/firewall6.conf
if [ ! -d /etc/network/if-up.d ]; then
mkdir /etc/network/if-up.d
mkdir -p /etc/network/if-up.d
fi
printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables