[mythtv-users] Buttons & Shell scripts

Jordi Puig jordipu at telefonica.net
Wed Jun 13 16:00:07 UTC 2007


Hi All
I'm triyng add some buttons to the Myth interface to make things easy
For example Start Stop MythWeb
I have create two shell scripts (start stop)
Apachestart.sh:
------------------
# ! /bin/bash
# This starts Web Mythweb
# This script created on 13 jun 2007
# Apachestart
sudo /sbin/service httpd start
exit
-----------------
Saved in /usr/local/bin/Apachestart.sh
chmod +x /usr/local/bin/Apachestart.sh
modified sudoers file with visudo
adding
mythtv TvBox = (root) NOPASSWD:/sbin/service httpd start
mythtv TvBox = (root) NOPASSWD:/sbin/service httpd stop

If I execute in command line
$ /usr/local/bin/Apachestart.sh
it works fine
But if I add a button in Util_Menu.xml
---------------------------------------------------
    <button>
       <type>WEBPAGE</type>
       <text>Start Mythweb</text>
       <action>EXEC '/usr/local/bin/Apachestart.sh'</action>
    </button>
----------------------------------------------------
Then, doesnt work
If I try
<action>EXEC sudo /sbin/service httpd start</action>
also doesnt work
What I'm doing wrong?


More information about the mythtv-users mailing list