start.sh 357 B

1234567891011
  1. PROXYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  2. PORT=${PORT:-9000}
  3. PROXYBIN=${PROXYBIN:-"$(which mitmdump)"}
  4. ARGS="-s '$PROXYDIR/proxy.py' -p $PORT"
  5. if [[ ! -z "$AUTH" ]]; then
  6. ARGS="$ARGS --singleuser=$AUTH"
  7. fi
  8. PIDFILE="$PROXYDIR/proxy.pid"
  9. start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --exec $PROXYBIN -- $ARGS