dockerfiles/mitmproxy/docker-entrypoint.sh
Jess Frazelle 9306c0c66e
fix mitmproxy
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-02-12 11:02:38 -08:00

14 lines
286 B
Bash
Executable File

#!/bin/sh
set -e
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