Hide Forgot
Description of problem: There are an error in systemd unit file of lsyncd systemctl start lsyncd.service [root@mgbstai02 log]# ps aux | grep lsyncd root 972 0.0 0.0 115232 1100 ? SNs 13:16 0:00 /usr/bin/sh -c eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS /etc/lsyncd.conf` root 973 0.0 0.0 115232 596 ? SN 13:16 0:00 /usr/bin/sh -c eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS /etc/lsyncd.conf` root 974 3.5 0.1 30964 20232 ? SN 13:16 0:00 /usr/bin/lsyncd -nodaemon /etc/lsyncd.conf As you can see in the preview capture, the sysconfig file is not realy used the sysconfig file look like this # Keep the space there for systemd. Don't nest variables without # changing the systemd service file to use: /usr/bin/sh -c 'eval XXXX' # #LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf" But the line is commented.. and should look like that # Keep the space there for systemd. Don't nest variables without # changing the systemd service file to use: /usr/bin/sh -c 'eval XXXX' # LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf" To work properly Then there is a duplication of the configuration file setting in the unit the unit look like this [Unit] Description=Live Syncing (Mirror) Daemon After=network.target [Service] Type=simple Nice=19 EnvironmentFile=-/etc/sysconfig/lsyncd ExecStart=/usr/bin/sh -c 'eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS /etc/lsyncd.conf`' [Install] WantedBy=multi-user.target ~ If I follow the way you want to build your unit, you don't have to specify again the path to conf then : [Unit] Description=Live Syncing (Mirror) Daemon After=network.target [Service] Type=simple Nice=19 EnvironmentFile=-/etc/sysconfig/lsyncd ExecStart=/usr/bin/sh -c 'eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS`' [Install] WantedBy=multi-user.target ~ And finally it's working [root@mgbstai02 log]# systemctl daemon-reload [root@mgbstai02 log]# systemctl restart lsyncd.service [root@mgbstai02 log]# ps aux | grep lsyncd root 1297 0.0 0.0 115232 1096 ? SNs 13:23 0:00 /usr/bin/sh -c eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS` root 1298 0.0 0.0 115232 604 ? SN 13:23 0:00 /usr/bin/sh -c eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS` root 1299 10.8 0.1 30960 20228 ? SN 13:23 0:00 /usr/bin/lsyncd -nodaemon -pidfile /var/run/lsyncd.pid /etc/lsyncd.conf Version-Release number of selected component (if applicable): [root@mgbstai02 log]# cat /etc/redhat-release Fedora release 19 (Schrödinger’s Cat) [root@mgbstai02 log]# rpm -qa | grep lsyncd lsyncd-2.1.4-3.fc19.x86_64 How reproducible: just install lsyncd Steps to Reproduce: 1. yum install lsyncd 2. fix missing /var/log/lsyncd directroy (https://bugzilla.redhat.com/show_bug.cgi?id=1015042) 3. systemctl start lsyncd.service Actual results: Expected results: Additional info:
I don't quite get what did you do here. You uncommented a line in an example file effectively adding a duplicate option and then complained that there's a duplicate option?
Sorry .. long time ago :-) In your unit you specify the configuration as ExecStart=/usr/bin/sh -c 'eval `/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS /etc/lsyncd.conf`' and in the config file you this commanted line #LSYNCD_OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf" At the epoch I think I was thinking about removing /etc/lsyncd.conf from that line and enable the pid creation by default. Sorry if it was really unclear :( Nowadays I think this tiquet is no more usefull and I will just close it. Sorry for the annoying comment :)