Code: Select all
#!/bin/sh
pgrep -n motionCode: Select all
root@raspberrypi:/home/pi# /home/pi/scripts/motion-act.sh
18411
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# /home/pi/scripts/motion-act.sh
18419
root@raspberrypi:/home/pi#
n...Another if it is run directly from command line. Then it is still and the same value when motion is turned on:
Code: Select all
root@raspberrypi:/home/pi# pgrep -n motion
18391
root@raspberrypi:/home/pi# pgrep -n motion
18391
root@raspberrypi:/home/pi# pgrep -n motion
18391Code: Select all
root@raspberrypi:/home/pi# pgrep -n motion
root@raspberrypi:/home/pi# pgrep -n motion
root@raspberrypi:/home/pi# pgrep -n motion
I would like to force motion is olways working follow example:
http://ni.recoverydata.pl/content/uruch ... %82a-pgrep
But it will never work due to reason abowe.
Maybe I could get some help here?
Thank you very much.