diff --git a/install.sh b/install.sh index bbe2655..8e46bb6 100755 --- a/install.sh +++ b/install.sh @@ -20,6 +20,13 @@ delete_pref() { # PRE-INSTALL PHASE # ##################### +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 + # Check if issued `./installer.sh uninstall` if [[ $1 == "uninstall" ]]; then echo "Warning: the following command will delete said folder and wipe out everything in its sub-directories" @@ -33,13 +40,6 @@ if [[ $1 == "uninstall" ]]; then exit 0; 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..." if [ ! -f /usr/bin/firefox ] && { [ ! -f /usr/lib/firefox/firefox ] && [ ! -f /usr/lib/firefox-developer-edition/firefox ]; }; then echo "ERROR: firefox not found..."