diff --git a/ApacheOverzicht.sh b/ApacheOverzicht.sh index 01e3942..951eb6c 100644 --- a/ApacheOverzicht.sh +++ b/ApacheOverzicht.sh @@ -1,3 +1,4 @@ + #!/bin/bash DATE=$(date) @@ -21,11 +22,17 @@ for conf in /etc/apache2/sites-enabled/*.conf; do in_vhost=1 current_domains=() current_port=$(echo "$line" | grep -oP ':[0-9]+' | tr -d ':') + current_auth="-" continue fi # VirtualHost einde if [[ "$line" =~ \ ]]; then + # Authenticatie opslaan voor alle domeinen in deze VirtualHost + for domain in "${current_domains[@]}"; do + AUTH_TYPES["$domain"]="$current_auth" + done + in_vhost=0 current_domains=() current_port="" @@ -80,7 +87,6 @@ for conf in /etc/apache2/sites-enabled/*.conf; do [[ "$line" =~ OIDCClientID ]]; then current_auth="Keycloak" fi - AUTH_TYPES["$domain"]="$current_auth" fi done < "$conf" done @@ -107,4 +113,4 @@ done echo echo \\\\ echo Hier aanpassen: https://git.de-roo.org/DEROO/ApacheOverzicht/_edit/main/ApacheOverzicht.sh -} \ No newline at end of file +}