controling mpsyt with bash
Posted: Friday 27 January 2017 22:57
hello,
I'm trying to use mpsyt https://github.com/mps-youtube/mps-youtube to make simple selector switch to play predefined songs over HDMI. it works really well when i make bash script with this command
but problem is with implementing stop (or kill) function
tried this simple code to kill process, but it works only in shell not in domoticz..
problem is maybe that script in shell is active and i cant send another command, but how fix this, or im missing something ?
it would be really great to create this way some favorite playlist and control them from domoticz
any idea?
I'm trying to use mpsyt https://github.com/mps-youtube/mps-youtube to make simple selector switch to play predefined songs over HDMI. it works really well when i make bash script with this command
Code: Select all
mpsyt "//(name of artist or songs name), 1, all -a shuffle"
but problem is with implementing stop (or kill) function
tried this simple code to kill process, but it works only in shell not in domoticz..
Code: Select all
#! /bin/bash
sudo /usr/bin/pkill mpsyt > /dev/null
sudo /usr/bin/pkill mpv > /dev/null
exit 0
it would be really great to create this way some favorite playlist and control them from domoticz
any idea?