#!/bin/bash # # Start up the Roger Wilco Base Station # and restart it if it falters # # it might be best to invoke this with nohup and put it into the background # e.g.: nohup ./run_rwbs & # echo -n "Starting run_rwbs script at " > rwbs.log date >> rwbs.log # make sure it's not already running killall -9 rwbs while : do echo "Starting rwbs..." >> rwbs.log # edit the following line to invoke rwbs with the parameters # you want it to run under ./rwbs -x 1 >>rwbs.log echo -n "rwbs crashed at " >> rwbs.log date >> rwbs.log sleep 30 # make sure it's really 100% dead. killall -9 rwbs sleep 60 done