browsh/webext/contrib/firefoxheadless.sh

9 wiersze
194 B
Bash
Executable File

#!/bin/bash
if [[ "$1" = "kill" ]]; then
kill $(ps aux|grep headless|grep 'profile /tmp'| tr -s ' ' | cut -d ' ' -f2)
else
FIREFOX_BIN=${FIREFOX:-firefox}
$FIREFOX_BIN --headless "$@"
fi