Thanks for the reply. I did as you suggested, but I ran into a small snag: It still asks me for a password when I run the script.
Here's the contents of my sudoers file:
And my startup script (which is owned by leeko):
# This file MUST be edited with the 'visudo' command as root.
# See the man page for details on how to write a sudoers file.
# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
mythtv ALL=NOPASSWD: /etc/acpi/*
leeko ALL=NOPASSWD: /etc/acpi/*
mythuser ALL=NOPASSWD: /etc/acpi/*
leeko ALL=NOPASSWD: /usr/sbin/pmi
leeko ALL = (mythtv) NOPASSWD: ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
When I reboot, the script kills the existing process, then does nothing else. If I run the script manually, it asks me for a password. If I've previously run a sudo command and entered my password, then the script runs flawlessly without requiring a password.
leeko@leeko-media:~$ cat /usr/local/bin/irexeclauncher
# Launcher for IREXEC because it's STUPID and won't launch properly in startup scripts!
sudo -u mythtv irexec /home/leeko/.lircrc &
I'm guessing that the entry in sudoers isn't doing what it's supposed to, but I've no idea how to fix it.