Implement check for RustDesk container before password reset
Add a loop to check if the RustDesk container is running before resetting the admin password.
This commit is contained in:
10
ru
10
ru
@@ -33,7 +33,15 @@ services:
|
|||||||
- rustdesk-net
|
- rustdesk-net
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
|
||||||
" > "$file_path"
|
" > "$file_path"
|
||||||
sleep 1
|
sleep 1
|
||||||
docker compose -p my_rustdesk_project -f /boot/1.yaml up -d
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user