firefoxheadless.sh 251 B

12345678910111213
  1. #!/usr/bin/env bash
  2. if [[ "$1" = "kill" ]]; then
  3. pkill --full 'firefox.*headless.*profile'
  4. sleep 1
  5. if [[ "$CI" == "true" ]]; then
  6. pkill -9 firefox || true
  7. fi
  8. else
  9. FIREFOX_BIN=${FIREFOX:-firefox}
  10. "$FIREFOX_BIN" --headless --marionette "$@"
  11. fi