mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-08 11:48:25 +02:00
Update winapps
This commit is contained in:
11
bin/winapps
11
bin/winapps
@@ -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
|
|
||||||
sleep 10
|
|
||||||
waRunCommand "$@"
|
waRunCommand "$@"
|
||||||
else
|
|
||||||
waRunCommand "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$AUTOPAUSE" == "on" ]]; then
|
if [[ "$AUTOPAUSE" == "on" ]]; then
|
||||||
waCheckIdle
|
waCheckIdle
|
||||||
|
Reference in New Issue
Block a user