dockerfiles/mitmproxy/docker-entrypoint.sh
Jess Frazelle c160d3c94f
cleanup mitmproxy
Signed-off-by: Jess Frazelle <acidburn@github.com>
2018-12-28 20:37:47 -05:00

14 lines
262 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 mitmproxy -c "$@"
else
exec "$@"
fi