Firefox sync script

I don't know about you, but I'm not satisfied with the firefox sync. Some addons don't sync at all, sometimes sync breaks entirely without a visible error. The size limit is understandable, but then why is it so hard to set up your own sync server. Anyway, here is a simple solution that works for me.

I just rsync all profiles from one machine to another. For this to work reliably, both machines need to be running the same firefox version, and firefox has to be stopped on both. The script below is my attempt to perform this sync safely.



if [ -z "$target" ]; then
  echo "ffsync TARGET (,, etc)"
  exit 1

if pgrep -af firefox-bin > /dev/null; then
  echo "Firefox is running, aborting"
  exit 2

if ssh $target "pgrep -af firefox-bin"; then
  echo "Firefox is running on $target, aborting"
  exit 3

echo "Firefox doesn't seem to be running. Syncing."

rsync --delete -avz ~/.mozilla/firefox ${target}:.mozilla/



Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo