detect if firefox is running

This commit is contained in:
DanielSGH 2023-02-11 00:42:12 +00:00
parent bcf1ea15fd
commit a9cd9145d9

View file

@ -33,6 +33,13 @@ if [[ $1 == "uninstall" ]]; then
exit 0; exit 0;
fi fi
firefox_proc=$(pgrep firefox);
if [ ! -z $firefox_proc ]; then
echo "Before installing, please make sure firefox is not running."
echo "Otherwise, changes cannot be made to prefs.js"
exit 0;
fi
echo "Detecting if firefox is installed on your system..." echo "Detecting if firefox is installed on your system..."
if [ ! -f /usr/bin/firefox ] || { [ ! -f /usr/lib/firefox/firefox ]; }; then if [ ! -f /usr/bin/firefox ] || { [ ! -f /usr/lib/firefox/firefox ]; }; then
echo "ERROR: firefox not found..." echo "ERROR: firefox not found..."
@ -94,4 +101,4 @@ if [[ $OSTYPE == "darwin"* ]]; then
set_pref "widget.macos.native-context-menus" "false" set_pref "widget.macos.native-context-menus" "false"
fi fi
echo "Finished successfully! Please (re)start firefox to see the changes."; echo "Finished successfully! Please start firefox to see the changes.";