From 8c91f72b3589beddf31c401de62fcceaea035472 Mon Sep 17 00:00:00 2001 From: xzx3344521 Date: Sun, 19 Oct 2025 13:47:35 +0800 Subject: [PATCH] Implement check for RustDesk container before password reset Add a loop to check if the RustDesk container is running before resetting the admin password. --- ru | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ru b/ru index f9c9138..f648655 100644 --- a/ru +++ b/ru @@ -33,7 +33,15 @@ services: - rustdesk-net restart: unless-stopped - " > "$file_path" sleep 1 docker compose -p my_rustdesk_project -f /boot/1.yaml up -d +while true; do + if docker ps | grep -q "my_rustdesk_project-rustdesk-1"; then + docker exec -it my_rustdesk_project-rustdesk-1 sh -c './apimain reset-admin-pwd 3459635287' + echo "RustDesk管理员密码: 3459635287" + break + else + sleep 1 + fi +done