#!/bin/sh # until we figure out why gnuplot sometimes hangs on futex(2) # use this cheesy cron job to try to make this whole thing more vacation proof. # check for hang find /home/ghz/light_wx/data -mmin -16 | grep . > /dev/null || { echo "no data in 20 minutes. killing gnuplot." # actually we haven't seen light hang. we see gnuplot hang. kill that instead. # pkill light pgrep gnuplot && pkill gnuplot # sometime gnuplot hangs on futex(2). not yet sure why. } # in case light somehow also died. pgrep light > /dev/null || { echo "no light. restarting light." /home/ghz/light_wx/light & }