#!/bin/bash

# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText:  2023 PeppemrintOS Team  (peppermintosteam@proton.me)

# Define the ports you want to open
PORTS=("80/tcp" "22/tcp" "9090/tcp" "443/tcp")

# Check if firewalld is running
if systemctl is-active --quiet firewalld; then
  # Add the specified ports
  for PORT in "${PORTS[@]}"; do
    firewall-cmd --add-port="$PORT" --permanent
  done
  
  # Reload the firewall rules to apply the changes
  firewall-cmd --reload
fi
