mitmproxy/release/docker/docker-entrypoint.sh

17 lines
316 B
Bash
Raw Normal View History

#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
2018-05-18 08:37:56 +00:00
MITMPROXY_PATH="/home/mitmproxy/.mitmproxy"
if [[ "$1" = "mitmdump" || "$1" = "mitmproxy" || "$1" = "mitmweb" ]]; then
mkdir -p "$MITMPROXY_PATH"
chown -R mitmproxy:mitmproxy "$MITMPROXY_PATH"
gosu mitmproxy "$@"
2018-05-18 08:37:56 +00:00
else
exec "$@"
2018-05-18 08:37:56 +00:00
fi