Hi, thnx for reading this im bumping in to a “problem”
On openelec i had this script, linked to my remote.xml SO when i pressed a button (blue) the rpi was checking if the hyperiond is loaded, if not it is loading it starts up, if it is loaded it stops. (on off switch).
in remote.xml (this is good)
RunScript("/home/osmc/hyperion/switch.py")
Now on OpenElec somebody wrote this script for me
import subprocess
pid = subprocess.Popen('pidof hyperiond', shell=True, close_fds=True, stdout=subprocess.PIPE)
try:
if pid.stdout.readlines():
subprocess.Popen('killall hyperiond', shell=True)
else:
subprocess.Popen('/opt/hyperion/bin/hyperiond /etc/hyperion.config.json </dev/null >/dev/null 2>&1 &', shell=True)
except Exception, e:
pass
But this doesnt do anything, anymore. I re-wrote the path in the script to the correcting once. i have this switch.py in /home/osmc/hyperion and hyperion app is on /opt/hyperion/bin/hyperiond
Can anyone help me with this?