From b394b09790b736f804dc4566e773956ff5b7d22e Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Sat, 29 Jan 2022 14:09:59 +0800 Subject: [PATCH] Chore: adjust entrypoint.sh --- docker/entrypoint.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index dfa4aa7..a38a13f 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -47,7 +47,7 @@ config_route() { done } -main() { +run() { create_tun create_table config_route @@ -58,27 +58,27 @@ main() { fi if [ -n "$MTU" ]; then - ARGS="-mtu $MTU" + ARGS="--mtu $MTU" fi if [ -n "$STATS" ]; then - ARGS="$ARGS -stats $STATS" + ARGS="$ARGS --stats $STATS" fi if [ -n "$TOKEN" ]; then - ARGS="$ARGS -token $TOKEN" + ARGS="$ARGS --token $TOKEN" fi if [ -n "$UDP_TIMEOUT" ]; then - ARGS="$ARGS -udp-timeout $UDP_TIMEOUT" + ARGS="$ARGS --udp-timeout $UDP_TIMEOUT" fi exec tun2socks \ - -loglevel "$LOGLEVEL" \ - -fwmark "$FWMARK" \ - -device "$TUN" \ - -proxy "$PROXY" \ + --loglevel "$LOGLEVEL" \ + --fwmark "$FWMARK" \ + --device "$TUN" \ + --proxy "$PROXY" \ $ARGS } -main || exit 1 +run || exit 1