Lirc doesn't run automatically after the boot

I tried to do so:
Sudo nano /etc/rc.local
And into the file i inserted the command to start lirc: sudo /etc/input.d/lircd start
Then i reboot all by the command sudo reboot but again if i want lirc starts i have to digit the command to start lirc (sudo /etc/input.d/lircd start)
How do you do it?

help me pls

How did you install lirc ( e.g. via package manager ) or from source ( e.g. github ) ?

Github

From which location on github / which url ?
Is there any logfile with lirc in it’s name in directory /var/log/ ( ls /var/log/lirc ) ?
Is there any entry in /var/log/syslog that contains the string lirc ( sudo grep -i lirc /var/log/syslog ) ?

From which location on github / which url ?

I don’t remember

Is there any logfile with lirc in it’s name in directory /var/log/ ( ls /var/log/ lirc ) ?

Is there any entry in /var/log/syslog that contains the string lirc ( sudo grep -i lirc /var/log/syslog ) ?

yes

Google is your friend. Please check the following tutorial, as this is not an openHAB or openHABian related issue.

You wrote that there are entries that are related to lirc in syslog. What is the content ? What is the message of these entries ?

Now i again digit the code "sudo grep -i lirc /var/log/syslog but i have nothing.
Maybe because yestarday i lanched lirc and today no

What do get back for ( do not manually start the service )

sysv-rc-conf --list | grep -i lirc

and

systemctl list-units --type service --all | grep -i lirc

i have this:

Based on the output that you posted it can be concluded that the service lircd is running.

No sorry.
Now i reboot all and i post the situation

here the situation after the reboot

the lircd service is failed.

If i want start it i have to activate manually

As long as the service is not started after booting - what is returned by

sudo systemctl status lircd.service

This is the file lircd


So we are again arrived at the same question as before.
Is the listen address/port for the service already in use ?

i think no.
how can i control it?

I dont’ understand.
If i turn on LIRC manually without problems, why doesn’t LIRC service start automatically at the reboot?

I tried to create e bash script so:

#!/bin/bash
### BEGIN INIT INFO
# Provides:          avvio_lirc.sh
# Required-Start:    hal
# Required-Stop:     
# Should-Start:      
# Should-Stop:       
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Avvio automatico LIRC
# Description:      Avvio automatico LIRC
### END INIT INFO

/etc/init.d/lircd start


exit 0

i activate all so

sudo chmod +x /etc/init.d/avvio_lirc.sh
sudo systemctl enable avvio_lirc.sh
sudo update-rc.d avvio_lirc.sh defaults

I solved by delaying the execution of the start command in the script by the command sleep 20

</
#!/bin/bash

BEGIN INIT INFO

Provides: avvio_lirc.sh

Required-Start: hal

Required-Stop:

Should-Start:

Should-Stop:

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Avvio automatico LIRC

Description: Avvio automatico LIRC

END INIT INFO

/etc/init.d/lircd start

sleep 20
exit 0

Thank’s anyway