Skip to content

Commit e63bb54

Browse files
committed
[INCOMPLETE] Shell scripts: various tweaks
Various tweaks to allow the scripts to pass the shellcheck checks.
1 parent 848d093 commit e63bb54

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: tests/utils/proxy/start.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ PORT=${PORT:-9000}
55

66
PROXYBIN=${PROXYBIN:-"$(which mitmdump)"}
77
ARGS="-s '$PROXYDIR/proxy.py' -p $PORT"
8-
if [[ ! -z "$AUTH" ]]; then
8+
if [[ -n "$AUTH" ]]; then
99
ARGS="$ARGS --proxyauth $AUTH"
1010
fi
1111
PIDFILE="$PROXYDIR/proxy-$PORT.pid"
1212

1313
set -x
1414

15-
start-stop-daemon --verbose --start --background --pidfile $PIDFILE --make-pidfile --exec $PROXYBIN -- $ARGS
15+
start-stop-daemon --verbose --start --background --pidfile "$PIDFILE" --make-pidfile --exec "$PROXYBIN" -- $ARGS
1616

17-
ps -p $(cat $PIDFILE) u
17+
ps -p "$(cat "$PIDFILE")" u
1818
sleep 2
19-
ps -p $(cat $PIDFILE) u
19+
ps -p "$(cat "$PIDFILE")" u

Diff for: tests/utils/proxy/stop.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

3-
PROXYDIR="$PWD/$(dirname $0)"
3+
PROXYDIR="$PWD/$(dirname "$0")"
44
PORT=${PORT:-9000}
55

66
PIDFILE="$PROXYDIR/proxy-$PORT.pid"
77

88
set -x
99

10-
start-stop-daemon --verbose --stop --pidfile $PIDFILE --remove-pidfile
10+
start-stop-daemon --verbose --stop --pidfile "$PIDFILE" --remove-pidfile

0 commit comments

Comments
 (0)