Browse Source

Create directory if needed

Bob Mottram 7 years ago
parent
commit
e429663435
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/freedombone-utils-firewall

+ 3
- 0
src/freedombone-utils-firewall View File

@@ -36,6 +36,9 @@ EXTERNAL_IPV4_ADDRESS=
36 36
 function save_firewall_settings {
37 37
     iptables-save > /etc/firewall.conf
38 38
     ip6tables-save > /etc/firewall6.conf
39
+    if [ ! -d /etc/network/if-up.d ]; then
40
+        mkdir /etc/network/if-up.d
41
+    fi
39 42
     printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
40 43
     printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
41 44
     printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables