fix icinga user add error

This commit is contained in:
Thorsten Spille
2025-07-23 19:06:06 +02:00
committed by GitHub
parent e5bae118a1
commit e58abab586

View File

@@ -287,8 +287,6 @@ _setup() {
icingacli module enable incubator
icingacli module enable director
# KORREKTUR: Die fehlerhaften 'icingacli setup' Befehle werden durch
# das manuelle Erstellen der Konfigurationsdateien ersetzt.
echo "[INFO] Erstelle Icinga Web 2 Kernkonfiguration."
bash -c "cat > /etc/icingaweb2/config.ini" <<EOF
[global]
@@ -322,9 +320,6 @@ type = "ido"
resource = "icinga_ido"
EOF
echo "[INFO] Füge Icinga Web 2 Admin-Benutzer hinzu."
icingacli user add icingaadmin --password "$ICINGAWEB_ADMIN_PASS"
echo "[INFO] Alle Services werden neu gestartet."
systemctl restart mariadb
systemctl restart icinga2
@@ -332,6 +327,10 @@ EOF
systemctl restart nginx
systemctl restart grafana-server
# KORREKTUR: Der 'user add' Befehl wird NACH dem Neustart der Dienste ausgeführt.
echo "[INFO] Füge Icinga Web 2 Admin-Benutzer hinzu."
icingacli user add icingaadmin --password "$ICINGAWEB_ADMIN_PASS"
echo "[INFO] Warte auf Icinga2 API..."
sleep 15
echo "[INFO] Icinga Director Setup wird ausgeführt."