check if firefox running before uninstall
This commit is contained in:
parent
7e0ba72e78
commit
366f9a9f0a
1 changed files with 7 additions and 7 deletions
14
install.sh
14
install.sh
|
@ -20,6 +20,13 @@ delete_pref() {
|
||||||
# PRE-INSTALL PHASE #
|
# 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`
|
# Check if issued `./installer.sh uninstall`
|
||||||
if [[ $1 == "uninstall" ]]; then
|
if [[ $1 == "uninstall" ]]; then
|
||||||
echo "Warning: the following command will delete said folder and wipe out everything in its sub-directories"
|
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;
|
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 ] && [ ! -f /usr/lib/firefox-developer-edition/firefox ]; }; then
|
if [ ! -f /usr/bin/firefox ] && { [ ! -f /usr/lib/firefox/firefox ] && [ ! -f /usr/lib/firefox-developer-edition/firefox ]; }; then
|
||||||
echo "ERROR: firefox not found..."
|
echo "ERROR: firefox not found..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue