run script from irexec
I built a mythtv pvr using fedora 7 and I am trying to get a script to execute from a button press on the remote control. Lirc and irexec are working properly from what I can tell. the remote works fine and the script to start and stop mythfrontend from the remote works. Problem is the other script I wish to run needs root privileges (i want to mount a remote filesystem with a button press). The script to check the if the remote machine is running and mount the filesystem was created as root and placed in a dir which is accessible by everyone. I added the line to the sudoers file to allow execution as root without a password - "mythtv ALL=NOPASSWD:/scripts/thescript.sh"
When I type sudo /scripts/thescript.sh as mythtv user from a shell, it executes and mounts the filessystem as desired. Now when I try to launch it from irexec, nothing happens. The command line in .lircrc is
# Mount movie drive on remote box
begin
prog = irexec
button = Videos
repeat = 3
config = sudo /scripts/thescript.sh
end
I have also tried creating an alias for the command (which works from a shell) but still does not function from irexec. No errors are being logged anywhere to track down why. Irexec is started in the background after mythtv logs on and shows as owned by mythtv from a ps command. Have I missed something when trying to set this up ??
|