Closed GoogleCodeExporter closed 9 years ago
Worked out that measureit init.d script was not working on startup as
data-input.py was failing to start due to MYSQL loading at a later time.
(this is due to MYSQL on Ubuntu being started by 'upstart' rather than init.d)
I think a work around is to use an upstart script to start data-input.py rather
than init.d
e.g. create /etc/init/measureit.conf
# Start when mysql started
start on started mysql
stop on runlevel [016]
# Start measureit via the daemon control script.
exec /usr/bin/python /var/www/python/data-input.py start
# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn
# Give up if restart occurs 10 times in 90 seconds.
respawn limit 10 90
Original comment by gor...@gmail.com
on 9 Nov 2012 at 10:56
I resolved this issue with the following steps:
1. # rm /etc/rc*/*measureit
2. # nano /etc/init.d/measureit:
#Required-Start: $remotefs $mysql $syslog $all
3. # update-rc.d measureit defaults
You can download my modified init script which also check that the service is
not already running
Original comment by rmcgovern095@gmail.com
on 10 Dec 2012 at 11:33
Attachments:
This won't work with distris that use 'upstart' rather than init.d for starting
MySQL (eg Ubuntu)?
Original comment by gor...@gmail.com
on 10 Dec 2012 at 11:57
I resolved this problem by using supervise. This is very cool and works on
every system.
setup instructions for supervise can be found here:
http://71421.de/wiki/doku.php?id=measureit:install:linux:supervise
How to start measureit with supervise here:
http://71421.de/wiki/doku.php?id=measureit:install:linux:measureit
These are my private and not well documentated instructions.
Detailed instructions and a patched version from supervise will be in the next
version from measureit
Original comment by lalelu...@gmail.com
on 10 Dec 2012 at 5:33
It works on my Raspberry Pi running Raspian Wheezy as in the OP
Original comment by rmcgovern095@gmail.com
on 10 Dec 2012 at 6:26
Attachments:
in the current setup the grabber process will be controlled by supervise from
daemontools
it starts the grabber on system boot, control it and restart it if it is not
running
Original comment by lalelu...@gmail.com
on 17 Feb 2013 at 2:18
Original issue reported on code.google.com by
gor...@gmail.com
on 8 Oct 2012 at 4:47