1

I created a file in /etc/init.d/startirexec.sh with the contents:

#! /bin/bash

### BEGIN INIT INFO
# Provides:          irexec
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of irexec
# Description:       starts instance of irexec
### END INIT INFO

irexec -d
exit 0

I then do a

sudo chmod +x startirexec.sh
sudo update-rc.d startirexec.sh defaults

Everything seems to go ok. I reboot but irexec is not loaded. If I do a

sudo ./startirexec.sh

manually it loads just fine. Am I missing something?

2

You can use UDEV to start programs such as irexec when a remote control is added, such as a MCE receiver.

Create a UDEV rule:

sudo nano /etc/udev/rules.d/irexec.rules

And paste in the following:

ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/irexec -d"

The Udev man page contains more information for putting together more advanced rules.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.