From bad18f77cbcc1f2a67854abc312fece14e9ecb0d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 13 Mar 2025 17:40:53 +0100 Subject: [PATCH] Update npmplus-install.sh --- install/npmplus-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/npmplus-install.sh b/install/npmplus-install.sh index 8ed55e6a9..eee851e24 100644 --- a/install/npmplus-install.sh +++ b/install/npmplus-install.sh @@ -93,15 +93,16 @@ msg_ok "Builded and started NPMplus" motd_ssh customize -echo -e "Retrieving Default Login (Patience)" +msg_info "Retrieving Default Login (Patience)" for i in {1..60}; do PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ {print; exit}') if [[ -n "$PASSWORD_LINE" ]]; then PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}') echo -e "username: admin@example.org\npassword: $PASSWORD" >/opt/.npm_pwd msg_ok "Saved default login to /opt/.npm_pwd" - exit 0 + return 0 fi sleep 2 - [[ $i -eq 60 ]] && echo -e "Failed to retrieve default login credentials. Please try it manually (docker ps, docker logs)" && exit 1 done +echo -e "Failed to retrieve default login credentials. Please try manually: docker ps, docker logs" +return 1