From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2013-04-16 18:15:24
|
Is there some issue with "EnvironmentFile=..." in systemd service file? I'm trying to use this type of service file: [Unit] Description=LIRC Daemon After=network.target [Service] Type=forking EnvironmentFile=/etc/conf.d/lircd.conf PIDFile=/run/lirc/lircd.pid ExecStartPre=/bin/mkdir -p /run/lirc ExecStartPre=/bin/rm -f /dev/lircd /run/lirc/lircd ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd ExecStart=/usr/sbin/lircd -d $LIRC_DEVICE -H $LIRC_DRIVER -P /run/lirc/lircd.pid $LIRC_CONFIGFILE ExecStopPost=/bin/rm -fR /dev/lircd /run/lirc [Install] WantedBy=multi-user.target But this is what I have to do to make it work: I have to pass the arguments explicitly to /usr/sbin/lircd. ... [Service] Type=forking EnvironmentFile=/etc/conf.d/lircd.conf PIDFile=/run/lirc/lircd.pid ExecStartPre=/bin/mkdir -p /run/lirc ExecStartPre=/bin/rm -f /dev/lircd /run/lirc/lircd ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd ExecStart=/usr/sbin/lircd -d "/dev/lirc0" -H "devinput" -P /run/lirc/lircd.pid /etc/lirc/lircd.conf ExecStopPost=/bin/rm -fR /dev/lircd /run/lirc ... The "EnvionmentFile=/etc/conf.d/lircd.conf" contains: LIRC_DEVICE = "/dev/lirc0" LIRC_DRIVER = "devinput" LIRC_CONFIGFILE = /etc/lirc/lircd.conf |