ok i’ve checked and it’s not working fully.
problem is with /usr/bin/sh /home/pi/killpir.sh
there is no /usr/bin/sh only rsh
edit.
ok i’ve changed path to /bin/sh and now i get error :
grep: pir.py: No such file or directory
pkill: no matching criteria specified
Try `pkill --help’ for more information.
even if pir.py is running (i can see it in ps -ef |grep pir)
edit ok i was able to fix it i’ve edited killpir.sh to
sudo kill $(ps aux | grep python | grep pir.py | awk ‘{ print $2 }’)
now it will kill process pir.py
but problem is that even if this script (pir.py) is not running the mirror still turns on when there is movement and turns off after 30s no movement … strange