fix: being able to use empty DNS_ADDRS with docker image

This commit is contained in:
Alexandre ABRIOUX
2022-04-11 08:32:33 +08:00
committed by Max Lv
parent 0c23224e92
commit e21f8248b6
+4 -1
View File
@@ -8,12 +8,15 @@ if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then
PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET")
fi
if [[ ! -z "$DNS_ADDRS" ]]; then
ARGS="-d $DNS_ADDRS $ARGS"
fi
exec ss-server \
-s $SERVER_ADDR \
-p $SERVER_PORT \
-k ${PASSWORD:-$(hostname)} \
-m $METHOD \
-t $TIMEOUT \
-d $DNS_ADDRS \
-u \
$ARGS