Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +4 -1
entrypoint.sh
CHANGED
|
@@ -3,7 +3,8 @@
|
|
| 3 |
# Exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
-
# Start the WARP daemon in the background
|
|
|
|
| 7 |
warp-svc --accept-tos &
|
| 8 |
|
| 9 |
# Wait for the WARP service to start
|
|
@@ -13,6 +14,7 @@ sleep "$WARP_SLEEP"
|
|
| 13 |
if [ ! -f /var/lib/cloudflare-warp/reg.json ]; then
|
| 14 |
echo "Registering WARP client..."
|
| 15 |
warp-cli register && echo "Warp client registered!"
|
|
|
|
| 16 |
# If a license key is provided, register the license
|
| 17 |
if [ -n "$WARP_LICENSE_KEY" ]; then
|
| 18 |
echo "License key found, registering license..."
|
|
@@ -21,6 +23,7 @@ if [ ! -f /var/lib/cloudflare-warp/reg.json ]; then
|
|
| 21 |
fi
|
| 22 |
|
| 23 |
# Set WARP to proxy mode and connect
|
|
|
|
| 24 |
warp-cli --accept-tos set-mode proxy
|
| 25 |
warp-cli --accept-tos connect
|
| 26 |
|
|
|
|
| 3 |
# Exit when any command fails
|
| 4 |
set -e
|
| 5 |
|
| 6 |
+
# Start the WARP daemon in the background as root
|
| 7 |
+
echo "Starting WARP service..."
|
| 8 |
warp-svc --accept-tos &
|
| 9 |
|
| 10 |
# Wait for the WARP service to start
|
|
|
|
| 14 |
if [ ! -f /var/lib/cloudflare-warp/reg.json ]; then
|
| 15 |
echo "Registering WARP client..."
|
| 16 |
warp-cli register && echo "Warp client registered!"
|
| 17 |
+
|
| 18 |
# If a license key is provided, register the license
|
| 19 |
if [ -n "$WARP_LICENSE_KEY" ]; then
|
| 20 |
echo "License key found, registering license..."
|
|
|
|
| 23 |
fi
|
| 24 |
|
| 25 |
# Set WARP to proxy mode and connect
|
| 26 |
+
echo "Setting WARP to proxy mode..."
|
| 27 |
warp-cli --accept-tos set-mode proxy
|
| 28 |
warp-cli --accept-tos connect
|
| 29 |
|