#!/bin/bash
set -euo pipefail

HTTP_SERVERS=()
HTTP_SERVERS_LEN="${#HTTP_SERVERS[@]}"

if command -v systemctl > /dev/null 2>&1; then
    if (( HTTP_SERVERS_LEN > 0 )); then
        for htserv in "${HTTP_SERVERS[@]}"
        do
            sudo systemctl stop "$htserv"
        done
    fi
fi
if command -v podman > /dev/null 2>&1; then
    podman stop -a
fi