Update winapps

This commit is contained in:
eylenburg
2025-06-23 12:16:44 +01:00
committed by GitHub
parent 3a71065db7
commit 3e84f5efdf

View File

@@ -50,6 +50,7 @@ RDP_SCALE=100
AUTOPAUSE="off" AUTOPAUSE="off"
AUTOPAUSE_TIME="300" AUTOPAUSE_TIME="300"
DEBUG="true" DEBUG="true"
BOOT_MAX_WAIT_TIME=120
# OTHER # OTHER
FREERDP_PID=-1 FREERDP_PID=-1
@@ -408,7 +409,6 @@ function waCheckContainerRunning() {
local TIME_ELAPSED=0 local TIME_ELAPSED=0
local TIME_LIMIT=60 local TIME_LIMIT=60
local TIME_INTERVAL=5 local TIME_INTERVAL=5
local MAX_WAIT_TIME=120
local WAIT_ELAPSED=0 local WAIT_ELAPSED=0
# Determine the state of the container. # Determine the state of the container.
@@ -477,7 +477,7 @@ function waCheckContainerRunning() {
dprint "WAITING FOR CONTAINER TO BE FULLY READY..." dprint "WAITING FOR CONTAINER TO BE FULLY READY..."
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Waiting for Windows to be ready..." notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Waiting for Windows to be ready..."
while (( WAIT_ELAPSED < MAX_WAIT_TIME )); do while (( WAIT_ELAPSED < BOOT_MAX_WAIT_TIME )); do
# Check if container is running # Check if container is running
if [[ $("$WAFLAVOR" inspect --format='{{.State.Status}}' "$CONTAINER_NAME") == "running" ]]; then if [[ $("$WAFLAVOR" inspect --format='{{.State.Status}}' "$CONTAINER_NAME") == "running" ]]; then
# Try to connect to RDP port to verify it's ready # Try to connect to RDP port to verify it's ready
@@ -502,7 +502,7 @@ function waCheckContainerRunning() {
done done
# If we timed out waiting for the container # If we timed out waiting for the container
if (( WAIT_ELAPSED >= MAX_WAIT_TIME )); then if (( WAIT_ELAPSED >= BOOT_MAX_WAIT_TIME )); then
dprint "TIMEOUT WAITING FOR CONTAINER TO BE READY" dprint "TIMEOUT WAITING FOR CONTAINER TO BE READY"
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Timeout waiting for Windows to be ready. Please try again." notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Timeout waiting for Windows to be ready. Please try again."
waThrowExit $EC_FAIL_START waThrowExit $EC_FAIL_START
@@ -719,12 +719,7 @@ else
fi fi
waCheckPortOpen waCheckPortOpen
if [ "$NEEDED_BOOT" = "true" ]; then waRunCommand "$@"
sleep 10
waRunCommand "$@"
else
waRunCommand "$@"
fi
if [[ "$AUTOPAUSE" == "on" ]]; then if [[ "$AUTOPAUSE" == "on" ]]; then
waCheckIdle waCheckIdle