M
MangledBlue
Guest
Hello everybody,
I've found that different pi os' behave better than others, but don't have a solid production-worthy recommendation (yet!)
For the dash soda machine, we're using the latest osmc build. Its kernel seems to have played the nicest with dashd.
(I put dashd on my home osmc/kodi install and let it run for over a week just fine)
When we started getting unexpected dashd crashes (on NOOBS I think), I decided to use osmc as our base image. (quick and dirty, but we needed stability pronto!)
For MangledBlue's pi, I installed 'monit' with the following configuration:
install
Code:sudo apt-get install monit
create file /home/user/.dash/start_dashd.sh
(change user to yours)
Code:#!/bin/bash /bin/su user -c '/home/user/.dash/dashd 2>&1 >> /home/user/.dash/rc.local.log'
make it executable
Code:chmod 755 /home/user/.dash/start_dashd.sh
sudo edit file /etc/monit/monitrc
Code:# uncomment these lines set httpd port 2812 and use address localhost # only accept connection from localhost allow localhost # allow localhost to connect to the server and # add this to bottom - change user to yours check process dashd with pidfile /home/user/.dash/dashd.pid start program = "/home/user/.dash/start_dashd.sh" with timeout 60 seconds stop program = "/bin/su user -c /home/user/.dash/dash-cli stop"
load the new configuration
Code:sudo monit reload
enable the watchdog
Code:sudo monit start dashd
That's it. You only have to do above once.
Then you can check status by doing
Code:sudo monit status
It'll keep your dashd running for you (across reboots too, no need for any crons or scripts) and keep you from fighting with your chosen os.
monit only runs once a minute, so be patient if you're waiting for it to do something.
If you need proof it works, once you see your dashd in the 'sudo monit status' output, you can test it by simply stopping your dashd (dash-cli stop) -- within 2 minutes it'll start it back up.
(But, you don't really need to do that, pi's take between 20 and 40 minutes to completely start up. I recommend leaving it alone once dashd is up and running.)
Enjoy!
Yeppers......
This thing works WONDERS!!!
The only time I've had to manually reboot/restart my MN for the past 2-3 months, at least, is when the power went out 2 weeks ago.
The above script is the way to go - completely awesome stuff :-D
THX again moocowmoo