/var/run/lircd is not created when run as systemd service

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm configuring lirc in Raspbian. Here my systemd service:



[Unit]
Description=Flexible IR remote input/output application support
Wants=lircd-setup.service
After=network.target lircd-setup.service

[Service]
Type=simple
ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00

[Install]
WantedBy=multi-user.target


and here the lirc_options.conf:



[lircd]
nodaemon = False
driver = irtoy
device = /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00
output = /var/run/lircd
pidfile = /var/run/lircd.pid
plugindir = /usr/lib/arm-linux-gnueabihf/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600

[lircmd]
uinput = False
nodaemon = False


It runs but it doesn't create the socket file /var/run/lircd.
Launching the very same command from shell:



/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00


leads to the correct behavior - i.e. the file is created and I can connect to the socket.



What would prevent this behavior when launched from systemd?







share|improve this question



















  • Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
    – nwildner
    Jun 25 at 20:45











  • I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
    – Mark
    Jun 25 at 20:50










  • That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
    – nwildner
    Jun 25 at 20:52











  • I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
    – Mark
    Jun 25 at 21:21










  • Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
    – Mark
    Jun 26 at 6:46














up vote
0
down vote

favorite












I'm configuring lirc in Raspbian. Here my systemd service:



[Unit]
Description=Flexible IR remote input/output application support
Wants=lircd-setup.service
After=network.target lircd-setup.service

[Service]
Type=simple
ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00

[Install]
WantedBy=multi-user.target


and here the lirc_options.conf:



[lircd]
nodaemon = False
driver = irtoy
device = /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00
output = /var/run/lircd
pidfile = /var/run/lircd.pid
plugindir = /usr/lib/arm-linux-gnueabihf/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600

[lircmd]
uinput = False
nodaemon = False


It runs but it doesn't create the socket file /var/run/lircd.
Launching the very same command from shell:



/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00


leads to the correct behavior - i.e. the file is created and I can connect to the socket.



What would prevent this behavior when launched from systemd?







share|improve this question



















  • Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
    – nwildner
    Jun 25 at 20:45











  • I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
    – Mark
    Jun 25 at 20:50










  • That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
    – nwildner
    Jun 25 at 20:52











  • I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
    – Mark
    Jun 25 at 21:21










  • Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
    – Mark
    Jun 26 at 6:46












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm configuring lirc in Raspbian. Here my systemd service:



[Unit]
Description=Flexible IR remote input/output application support
Wants=lircd-setup.service
After=network.target lircd-setup.service

[Service]
Type=simple
ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00

[Install]
WantedBy=multi-user.target


and here the lirc_options.conf:



[lircd]
nodaemon = False
driver = irtoy
device = /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00
output = /var/run/lircd
pidfile = /var/run/lircd.pid
plugindir = /usr/lib/arm-linux-gnueabihf/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600

[lircmd]
uinput = False
nodaemon = False


It runs but it doesn't create the socket file /var/run/lircd.
Launching the very same command from shell:



/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00


leads to the correct behavior - i.e. the file is created and I can connect to the socket.



What would prevent this behavior when launched from systemd?







share|improve this question











I'm configuring lirc in Raspbian. Here my systemd service:



[Unit]
Description=Flexible IR remote input/output application support
Wants=lircd-setup.service
After=network.target lircd-setup.service

[Service]
Type=simple
ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00

[Install]
WantedBy=multi-user.target


and here the lirc_options.conf:



[lircd]
nodaemon = False
driver = irtoy
device = /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00
output = /var/run/lircd
pidfile = /var/run/lircd.pid
plugindir = /usr/lib/arm-linux-gnueabihf/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600

[lircmd]
uinput = False
nodaemon = False


It runs but it doesn't create the socket file /var/run/lircd.
Launching the very same command from shell:



/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00


leads to the correct behavior - i.e. the file is created and I can connect to the socket.



What would prevent this behavior when launched from systemd?









share|improve this question










share|improve this question




share|improve this question









asked Jun 25 at 19:56









Mark

1339




1339











  • Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
    – nwildner
    Jun 25 at 20:45











  • I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
    – Mark
    Jun 25 at 20:50










  • That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
    – nwildner
    Jun 25 at 20:52











  • I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
    – Mark
    Jun 25 at 21:21










  • Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
    – Mark
    Jun 26 at 6:46
















  • Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
    – nwildner
    Jun 25 at 20:45











  • I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
    – Mark
    Jun 25 at 20:50










  • That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
    – nwildner
    Jun 25 at 20:52











  • I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
    – Mark
    Jun 25 at 21:21










  • Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
    – Mark
    Jun 26 at 6:46















Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
– nwildner
Jun 25 at 20:45





Maybe cause the default config file (lircd manpages) that the software will search for is /etc/lirc/lircd.conf not lirc_options.conf Maybe you will have to force the config file if you want to use a specific naming by passing as the last argument of your ExecStart line: ExecStart=/usr/sbin/lircd -n -H irtoy -d /dev/serial/by-id/usb-Irdroid_USB_Infrared_Transceiver_00000002-if00 /path/to/lirc_options.conf...
– nwildner
Jun 25 at 20:45













I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
– Mark
Jun 25 at 20:50




I also have lircd.conf, but it contains the remote definitions. And it's read because the codes are sent correctly. The lirc_options.conf is created by the Debian package, I didn't create by myself.
– Mark
Jun 25 at 20:50












That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
– nwildner
Jun 25 at 20:52





That's fine, but you are running it as a daemon and it is supposed to read that config file, not lirc_options.conf. Maybe Debian changed that behavior and reading man lircd could give you a clue of what is the default config file this daemon expect.
– nwildner
Jun 25 at 20:52













I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
– Mark
Jun 25 at 21:21




I'm still confused... I pass the -n argument: it should not run as a daemon ("-n --nodaemon")
– Mark
Jun 25 at 21:21












Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
– Mark
Jun 26 at 6:46




Anyway I tried your suggestion, but it doesn't work: it complains "lirc_options.conf" doesn't contain remote definitions (they are in "lircd.conf")
– Mark
Jun 26 at 6:46















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451841%2fvar-run-lircd-is-not-created-when-run-as-systemd-service%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451841%2fvar-run-lircd-is-not-created-when-run-as-systemd-service%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?