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