Wednesday, September 18, 2013

Firefox sync server on a Raspberry Pi running Raspbian

Updated 2/11/2014:
A better way to get weave-minimal running.
This link is to my new post, redone as a streamlined one step install script

I'm leaving the original here for reference purposes.

______________________________________________________________________


Original post from 9/18/2013

This post has good ideas, but it doesn't go far enough to a server that automatically starts after reboot.  The Weave Minimal page has more clues, including a script to stick in into init.d, but it's not quite complete either.

my steps:

1) upgrade everything first. optional, but it's my preference

sudo apt-get update && sudo apt-get upgrade && sudo reboot

2) install python-setuptools 

sudo apt-get install python-setuptools
 
3) install weave-minimal


sudo easy_install -U weave-minimal


4) create the start script in /etc/init.d/weave-minimal from here.  I used a ssh window, opened nano and pasted the content into it.

5) on the line starting with "--port" add "--host=0.0.0.0" before the --port.  
This lets the server respond to any request on any interface, not just the localhost. 

(Understand, that there may be good reasons not to allow this. In my case, the server isn't actually hosted on the internet, just internally, with multiple firewalls in place.  YOYO applies)

6) set the permissions

 sudo chmod 755  /etc/init.d/weave-minimal

7) add to the runlevels.

sudo update-rc.d weave-minimal defaults

the command will respond:

update-rc.d: using dependency based boot sequencing
insserv: warning: script 'weave-minimal' missing LSB tags and overrides


 however, it works.

8) sudo reboot

The rest of the setup is in firefox.  Your sync server is the pi's ip address and port 8080. (id. http://pi-ip:8080/)  Browsing directly will result in "Not Implemented The server does not support the action requested by the browser."
 
 

No comments:

Post a Comment