Skip to content

Instantly share code, notes, and snippets.

@marcusscomputer
Created October 19, 2020 18:42
Show Gist options
  • Save marcusscomputer/b2274b046a95d74c5b53032d2c91b752 to your computer and use it in GitHub Desktop.
Save marcusscomputer/b2274b046a95d74c5b53032d2c91b752 to your computer and use it in GitHub Desktop.
Raspberry Sync for Firefox
#!/bin/bash
HOMEDIR="/home/YOUR_USERNAME"
BROWSERSYNC="/mnt/PI_MOUNTPOINT_TO_DESIRED_FOLDER"
TMPSYNC="/tmp/browsersync"
rm -rf $TMPSYNC
mkdir $TMPSYNC
unlink $HOMEDIR/.mozilla
echo YOUR_RASPBERRY_PI_LOGIN_PASSWORD | sshfs -o password_stdin USERNAME@IP_ADDRESS_OF_PI:/home/USERNAME /DESIRED_MOUNT_POINT_FOR_PI
cp -r $BROWSERSYNC/* /tmp/browsersync
ln -sv $TMPSYNC /home/marcus-s/.mozilla
/usr/bin/firefox
rm -rf $BROWSERSYNC
mkdir $BROWSERSYNC
cp -r /tmp/browsersync/* $BROWSERSYNC
rm -rf /tmp/browsersync
unlink $HOMEDIR/.mozilla
fusermount -u /DESIRED_MOUNT_POINT_FOR_PI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment