Skip to content

Commit

Permalink
Turn $ARGS into array to fix shellcheck issue
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Feb 3, 2025
1 parent e63bb54 commit 15cf874
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/utils/proxy/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ PROXYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PORT=${PORT:-9000}

PROXYBIN=${PROXYBIN:-"$(which mitmdump)"}
ARGS="-s '$PROXYDIR/proxy.py' -p $PORT"

ARGS=(-s "$PROXYDIR/proxy.py" -p "$PORT")
if [[ -n "$AUTH" ]]; then
ARGS="$ARGS --proxyauth $AUTH"
ARGS+=("--proxyauth" "$AUTH")
fi
PIDFILE="$PROXYDIR/proxy-$PORT.pid"

set -x

start-stop-daemon --verbose --start --background --pidfile "$PIDFILE" --make-pidfile --exec "$PROXYBIN" -- $ARGS
start-stop-daemon --verbose --start --background --pidfile "$PIDFILE" --make-pidfile --exec "$PROXYBIN" -- "${ARGS[@]}"

ps -p "$(cat "$PIDFILE")" u
sleep 2
Expand Down

0 comments on commit 15cf874

Please sign in to comment.