jaron42 / brata

Automatically exported from code.google.com/p/brata
0 stars 1 forks source link

Configure RPi stations to launch brata.station automatically on power-up #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The stations delivered to the schools, and the ones used during the competition 
will be headless.  They need to power on and boot directly into the 
brata.station software.  A method to gracefully shutdown would also be good, 
but there is no direct input for some of the configurations.

Original issue reported on code.google.com by ellery.c...@gmail.com on 27 Jan 2015 at 10:21

GoogleCodeExporter commented 9 years ago
GUB already provides these steps. Look for /etc/init/brata_station.conf in the 
GUB.

Original comment by jawaad.a...@gmail.com on 1 Feb 2015 at 8:38

GoogleCodeExporter commented 9 years ago

Original comment by ellery.c...@gmail.com on 6 Feb 2015 at 3:28

GoogleCodeExporter commented 9 years ago
Working.  There was a race condition between the brata.station and the Apache 
server.  If the station comes up first, it may send its join message to the MS 
before the MS is alive, which results in the station not getting registered.

I added a loop with a 10 second delay that looks for the Apache process before 
it launches the brata.station.  I can't guarantee that it is bullet-proof, but 
it seems to work.

The startup scripts are supposed to be able to impose dependencies between 
them, but the Apache server is started by a systemd script, while brata.station 
is started by an upstart script.  Apparently the events from one do not affect 
the other.  hence the polling loop.

Original comment by ellery.c...@gmail.com on 7 Feb 2015 at 9:15

GoogleCodeExporter commented 9 years ago

Original comment by ellery.c...@gmail.com on 7 Feb 2015 at 9:15

GoogleCodeExporter commented 9 years ago

Original comment by jawaad.a...@gmail.com on 18 Feb 2015 at 11:33