mitmproxy/release/docker/docker-entrypoint.sh
Maximilian Hils 99aa0a70af
Docker: use latest python and debian (#7242)
* docker: use latest python and debian

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-13 18:21:57 +02:00

25 lines
498 B
Bash
Executable file

#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
MITMPROXY_PATH="/home/mitmproxy/.mitmproxy"
if [ -f "$MITMPROXY_PATH/mitmproxy-ca.pem" ]; then
f="$MITMPROXY_PATH/mitmproxy-ca.pem"
else
f="$MITMPROXY_PATH"
fi
usermod -o \
-u $(stat -c "%u" "$f") \
-g $(stat -c "%g" "$f") \
mitmproxy \
>/dev/null # hide "usermod: no changes"
if [[ "$1" = "mitmdump" || "$1" = "mitmproxy" || "$1" = "mitmweb" ]]; then
exec gosu mitmproxy "$@"
else
exec "$@"
fi