#!/bin/bash # Path to the Firefox Profiles directory FF_PROFILE_PATH="$HOME/Library/ApplicationSupport/Firefox/Profiles" # Get the "Default" path for your profile. # Alternatively look for '*.dev-edition-default' FF_PROFILE_DIR=`cd $FF_PROFILE_PATH; find . -maxdepth 1 -name '*.default' | cut -sd / -f 2-` # Remove the localhost line in the file, and create a backup sed -i.bak '/localhost/d' $FF_PROFILE_PATH/$FF_PROFILE_DIR/SiteSecurityServiceState.txt # Prompt to restart Firefox /Applications/Firefox.app/Contents/MacOS/firefox -new-tab "about:restartrequired"