From bcd3cd6192dd5c7b1d125c17fbc6977a88c33b02 Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 16 Jul 2019 12:00:37 -0700 Subject: [PATCH] tweaks with ufw --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.sh b/setup.sh index 6a123a8..943315e 100644 --- a/setup.sh +++ b/setup.sh @@ -470,6 +470,15 @@ echo " dns-nameservers 127.0.0.53" >> /mnt/etc/network/interfaces.d/br0 echo "source-directory /etc/network/interfaces.d" > /mnt/etc/network/interfaces echo "Done." +echo "echo \"\"" >> /mnt/setup-chroot.sh +echo "echo \"Enabling UFW on boot...\"" >> /mnt/setup-chroot.sh +echo "errors=\$(systemctl enable ufw 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh +echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh +echo ' echo "Failed to enable UFW - $errors"' >> /mnt/setup-chroot.sh +echo " exit 1">> /mnt/setup-chroot.sh +echo "fi">> /mnt/setup-chroot.sh +echo "echo \"Done.\"" >> /mnt/setup-chroot.sh + exit 0 # commented out for debugging