dockerfiles/mitmproxy/docker-entrypoint.sh
Jess Frazelle 5eccef3c66
more shellcheck
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-09-24 19:17:06 -04:00

14 lines
292 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