omxplayer
Posted: Monday 22 October 2018 0:03
Hi I'm using omxplyer to play a rstp feed off my ip camera to a monitor connected to my domoticz pi. I've written a small bash script to open omxplayer when i turn a dummy switch on and it works well. The problem is that when i send the off command from the switch I've tried to run a script using pkill to close omxplayer but it does not shut down. if i run the script from command line it works fine.
#!/bin/sh
sudo /usr/bin/pkill -9 -f "omxplayer"
echo "Done"
#!/bin/sh
sudo /usr/bin/pkill -9 -f "omxplayer"
echo "Done"