This repository has been archived on 2024-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
shadowsocks-libev-v2ray/entrypoint.sh
2022-12-15 03:14:16 +03:00

20 lines
481 B
Bash

#!/bin/sh
set -o errexit
if [ "$1" = "/usr/bin/ss-server" ]; then
if [ -f "$PASSWORD_FILE" ]; then
PASSWORD="$(cat "$PASSWORD_FILE")"
fi
if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then
PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET")
fi
ARGS="-s $SERVER_HOST -p $SERVER_PORT -k ${PASSWORD:-$(hostname)} \
-m $METHOD -t $TIMEOUT -u $DNS --fast-open --reuse-port --plugin $PLUGIN \
--plugin-opts $PLUGIN_OPTS $ARGS"
fi
exec $@ $ARGS