From 72432a4794f80ab78c4b2888ce32b781ed3b1058 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 25 Jan 2023 14:08:00 -0500 Subject: [PATCH] Allow overwriting existing fw rules --- installJRMC | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/installJRMC b/installJRMC index d4f0f7e..a5df1c1 100755 --- a/installJRMC +++ b/installJRMC @@ -1032,14 +1032,12 @@ openFirewall() { execute "sudo firewall-cmd --reload" fi elif hash ufw 2>/dev/null; then - if [[ ! -f "/etc/ufw/applications.d/$service" ]]; then - sudo bash -c "cat <<-EOF > /etc/ufw/applications.d/$service - [$service] - title=$service - description=$service installed by installJRMC - ports=$u_ports - EOF" - fi + sudo bash -c "cat <<-EOF > /etc/ufw/applications.d/$service + [$service] + title=$service + description=$service installed by installJRMC + ports=$u_ports + EOF" execute "sudo ufw app update $service" execute "sudo ufw allow $service" else