Files
RustProxy/scripts/routeros-oci-build/docker-entrypoint.sh
T
2026-10-03 00:27:09 +01:00

18 lines
418 B
Bash
Executable File

#!/bin/sh
set -eu
DATA_DIR="${RUST_PROXY_DATA_DIR:-/var/lib/rustproxy}"
RUSTPROXY_UID="${RUSTPROXY_UID:-10001}"
RUSTPROXY_GID="${RUSTPROXY_GID:-10001}"
if [ "$(id -u)" = "0" ]; then
mkdir -p "$DATA_DIR"
chown "$RUSTPROXY_UID:$RUSTPROXY_GID" "$DATA_DIR"
chmod 0700 "$DATA_DIR"
exec gosu "$RUSTPROXY_UID:$RUSTPROXY_GID" \
/usr/local/bin/rust-proxy "$@"
fi
exec /usr/local/bin/rust-proxy "$@"