Skip to content

Commit bad18f7

Browse files
authored
Update npmplus-install.sh
1 parent 09cca74 commit bad18f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

install/npmplus-install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,16 @@ msg_ok "Builded and started NPMplus"
9393
motd_ssh
9494
customize
9595

96-
echo -e "Retrieving Default Login (Patience)"
96+
msg_info "Retrieving Default Login (Patience)"
9797
for i in {1..60}; do
9898
PASSWORD_LINE=$(docker logs "$CONTAINER_ID" 2>&1 | awk '/Creating a new user:/ {print; exit}')
9999
if [[ -n "$PASSWORD_LINE" ]]; then
100100
PASSWORD=$(echo "$PASSWORD_LINE" | awk -F 'password: ' '{print $2}')
101101
echo -e "username: [email protected]\npassword: $PASSWORD" >/opt/.npm_pwd
102102
msg_ok "Saved default login to /opt/.npm_pwd"
103-
exit 0
103+
return 0
104104
fi
105105
sleep 2
106-
[[ $i -eq 60 ]] && echo -e "Failed to retrieve default login credentials. Please try it manually (docker ps, docker logs)" && exit 1
107106
done
107+
echo -e "Failed to retrieve default login credentials. Please try manually: docker ps, docker logs"
108+
return 1

0 commit comments

Comments
 (0)