run.sh 413 Bytes
#!/bin/bash

cd ~ncsteam/lcd
while true
do
	echo "[`date`] - First attempt to kill any existing LCD console process"
	su root -c "pkill run.py"
	su root -c "python matrix_factory_init.py /dev/ttyACM0"
	sleep 5
	echo "[`date`] - Running new LCD console process"
	su root -c "cd ~ncsteam/lcd ; python run.py"
	echo "[`date`] - Terminated, clean up old LCD console process"
	su root -c "pkill run.py"
	sleep 30
done