Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +5 -1
entrypoint.sh
CHANGED
|
@@ -3,11 +3,15 @@
|
|
| 3 |
# Exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
-
#
|
|
|
|
|
|
|
|
|
|
| 7 |
echo "Starting WARP service..."
|
| 8 |
warp-svc --accept-tos &
|
| 9 |
|
| 10 |
# Wait for the WARP service to start
|
|
|
|
| 11 |
sleep "$WARP_SLEEP"
|
| 12 |
|
| 13 |
# Check if WARP is registered; if not, perform registration and connection
|
|
|
|
| 3 |
# Exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
+
# Set a default value for WARP_SLEEP if not set
|
| 7 |
+
: "${WARP_SLEEP:=2}"
|
| 8 |
+
|
| 9 |
+
# Start the WARP daemon in the background
|
| 10 |
echo "Starting WARP service..."
|
| 11 |
warp-svc --accept-tos &
|
| 12 |
|
| 13 |
# Wait for the WARP service to start
|
| 14 |
+
echo "Sleeping for $WARP_SLEEP seconds to allow WARP service to start..."
|
| 15 |
sleep "$WARP_SLEEP"
|
| 16 |
|
| 17 |
# Check if WARP is registered; if not, perform registration and connection
|