From 5e52452b9c48989a85569eb67fd102b8ccfca274 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:03:17 +0100 Subject: [PATCH] Update nginx-ui-install.sh --- install/nginx-ui-install.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/install/nginx-ui-install.sh b/install/nginx-ui-install.sh index d8800b43f..b309fb5fe 100644 --- a/install/nginx-ui-install.sh +++ b/install/nginx-ui-install.sh @@ -83,16 +83,10 @@ systemctl start nginx-ui sleep 3 systemctl stop nginx-ui sleep 1 -RESET_OUTPUT=$(/usr/local/bin/nginx-ui reset-password --config /usr/local/etc/nginx-ui/app.ini 2>&1) -ADMIN_PASS=$(echo "$RESET_OUTPUT" | grep -oP 'Password: \K\S+' | tail -1) -if [[ -z "$ADMIN_PASS" ]]; then - ADMIN_PASS="Check ~/nginx-ui.creds after manual reset" -fi -{ - echo "Nginx-UI Credentials" - echo "Username: admin" - echo "Password: $ADMIN_PASS" -} >~/nginx-ui.creds +/usr/local/bin/nginx-ui reset-password --config /usr/local/etc/nginx-ui/app.ini &>/tmp/nginx-ui-reset.log || true +ADMIN_PASS=$(grep -oP 'Password: \K\S+' /tmp/nginx-ui-reset.log || echo "admin") +echo -e "Nginx-UI Credentials\nUsername: admin\nPassword: $ADMIN_PASS" >~/nginx-ui.creds +rm -f /tmp/nginx-ui-reset.log msg_ok "Created Initial Admin User" msg_info "Starting Service"