File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,16 @@ if [[ "${1}" == 'mitmdump' || "${1}" == 'mitmproxy' || "${1}" == 'mitmweb' ]]; t
3838 fi
3939
4040 # Create a bashrc file that auto-attaches to tmux on interactive shell
41- cat > /root/.bashrc << 'BASHRC_EOF '
41+ # Write to the mitmproxy user's home directory
42+ cat > /home/mitmproxy/.bashrc << 'BASHRC_EOF '
4243# Auto-attach to mitmproxy tmux session if it exists and we're in an interactive shell
4344if [[ $- == *i* ]] && [ -z "$TMUX" ]; then
4445 if tmux has-session -t mitmproxy 2>/dev/null; then
4546 exec tmux attach-session -t mitmproxy
4647 fi
4748fi
4849BASHRC_EOF
50+ chmod 644 /home/mitmproxy/.bashrc
4951
5052 # Keep the container running - sleep indefinitely
5153 # This allows users to attach via: kubectl exec -it <pod> -- tmux attach-session -t mitmproxy
You can’t perform that action at this time.
0 commit comments