mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2025-08-02 12:15:01 +02:00
fix user creation
This commit is contained in:
@@ -327,10 +327,11 @@ EOF
|
|||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
systemctl restart grafana-server
|
systemctl restart grafana-server
|
||||||
|
|
||||||
# KORREKTUR: Der 'user add' Befehl wird NACH dem Neustart der Dienste ausgeführt.
|
# KORREKTUR: Füge den Admin-Benutzer direkt in die Datenbank ein.
|
||||||
echo "[INFO] Füge Icinga Web 2 Admin-Benutzer hinzu."
|
echo "[INFO] Füge Icinga Web 2 Admin-Benutzer direkt in die Datenbank ein."
|
||||||
icingacli user add icingaadmin --password "$ICINGAWEB_ADMIN_PASS"
|
local PASSWORD_HASH=$(icingacli security account password-hash --password "${ICINGAWEB_ADMIN_PASS}")
|
||||||
|
mysql icingaweb2 -e "INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('icingaadmin', 1, '${PASSWORD_HASH}') ON DUPLICATE KEY UPDATE password_hash='${PASSWORD_HASH}';"
|
||||||
|
|
||||||
echo "[INFO] Warte auf Icinga2 API..."
|
echo "[INFO] Warte auf Icinga2 API..."
|
||||||
sleep 15
|
sleep 15
|
||||||
echo "[INFO] Icinga Director Setup wird ausgeführt."
|
echo "[INFO] Icinga Director Setup wird ausgeführt."
|
||||||
|
Reference in New Issue
Block a user