mitmproxy/release/docker/docker-entrypoint.sh
2020-04-11 12:25:56 +02:00

17 lines
327 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
MITMPROXY_PATH="/home/mitmproxy/.mitmproxy"
if [[ "$1" = "mitmdump" || "$1" = "mitmproxy" || "$1" = "mitmweb" ]]; then
mkdir -p "$MITMPROXY_PATH"
chown -R mitmproxy:mitmproxy "$MITMPROXY_PATH"
su-exec mitmproxy "$@"
else
exec "$@"
fi