Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +4 -2
entrypoint.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
# Exit
|
| 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 |
|
|
@@ -24,6 +24,8 @@ if [ ! -f /var/lib/cloudflare-warp/reg.json ]; then
|
|
| 24 |
echo "License key found, registering license..."
|
| 25 |
warp-cli register --license "$WARP_LICENSE_KEY" && echo "Warp license registered!"
|
| 26 |
fi
|
|
|
|
|
|
|
| 27 |
fi
|
| 28 |
|
| 29 |
# Set WARP to proxy mode and connect
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Exit on any error
|
| 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 |
|
|
|
|
| 24 |
echo "License key found, registering license..."
|
| 25 |
warp-cli register --license "$WARP_LICENSE_KEY" && echo "Warp license registered!"
|
| 26 |
fi
|
| 27 |
+
else
|
| 28 |
+
echo "WARP client is already registered."
|
| 29 |
fi
|
| 30 |
|
| 31 |
# Set WARP to proxy mode and connect
|