mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
df6bbf1d4e
fixes #3933
18 lines
408 B
Bash
Executable File
18 lines
408 B
Bash
Executable File
#!/bin/sh
|
|
# WARNING: do not change the shebang - the Docker base image might not have what you want!
|
|
|
|
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
|