#!/bin/sh

# get rid of the cursor so we don't see it when videos are running
setterm -cursor off

# set here the path to the directory containing your videos
VIDEOPATH="/home/pi/dataku/counter" 

# you can normally leave this alone
SERVICE="motor.py"

# now for our infinite loop!
while true; do
        if ps ax | grep -v grep | grep $SERVICE > /dev/null
        then
        sleep 5;
else
        for entry in $VIDEOPATH/*
        do
                /home/sindu/dataku/orang
                ./jismotor > /dev/null
                sleep 9
        done
fi
done
