Hi, look at this:
Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 22:58:36 CEST 2013 Job for spamd.service failed. See 'systemctl status spamd.service' and 'journalctl -n' for details. Telcontar:~ # date;systemctl status spamd.service Sat Jun 15 22:58:40 CEST 2013 spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; enabled) Active: failed (Result: exit-code) since Sat, 2013-06-15 22:58:36 CEST; 3s ago Process: 31577 ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid (code=exited, status=64) Process: 31573 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/spamd.service
Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --ssl-version sslversion Specify SSL protocol version to use Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-key keyfile Specify an SSL keyfile Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --server-cert certfile Specify an SSL certificate Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketpath=path Listen on given UNIX domain socket Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketowner=name Set UNIX domain socket file's owner Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketgroup=name Set UNIX domain socket file's group Jun 15 22:58:36 Telcontar.valinor spamd[31577]: --socketmode=mode Set UNIX domain socket file's mode Jun 15 22:58:36 Telcontar.valinor spamd[31577]: -V, --version Print version and exit Jun 15 22:58:36 Telcontar.valinor systemd[1]: Failed to start Daemonized version of spamassassin. Jun 15 22:58:36 Telcontar.valinor systemd[1]: Unit spamd.service entered failed state Telcontar:~ #
Is systemd calling "/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid" without expanding "$SPAMD_ARGS"?
Telcontar:~ # cat /usr/lib/systemd/system/spamd.service # This file is part of package amavisd. # # Copyright (c) 2011 SuSE LINUX Products GmbH, Germany. # Author: Werner Fink # Please send feedback to http://www.suse.de/feedback # # Description: # # Used to start the spamd the daemonized version of spamassassin # spamassassin adds a header line that shows if the mail has been # determined spam or not. This way, you can decide what to do with the # mail within the scope of your own filtering rules in your MUA (Mail # User Agent, your mail program) or your LDA (Local Delivery Agent). #
[Unit] Description=Daemonized version of spamassassin Requires=remote-fs.target syslog.target After=remote-fs.target syslog.target Before=mail-transfer-agent.target Conflicts=
[Service] Type=forking PIDFile=/var/run/spamd.pid ExecStartPre=-/bin/echo 'Starting spamd:' EnvironmentFile=-/etc/sysconfig/spamd ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid
[Install] WantedBy=multi-user.target Telcontar:~ #
I edit the line, replacing the contents: #ExecStart=/usr/sbin/spamd $SPAMD_ARGS -r /var/run/spamd.pid ExecStart=/usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid Then restart the service:
Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 23:05:52 CEST 2013 Warning: Unit file of spamd.service changed on disk, 'systemctl --system daemon-reload' recommended. Job for spamd.service failed. See 'systemctl status spamd.service' and 'journalctl -n' for details.
Telcontar:~ # systemctl --system daemon-reload Telcontar:~ # date;systemctl restart spamd.service Sat Jun 15 23:06:09 CEST 2013 Telcontar:~ # date;systemctl status spamd.service Sat Jun 15 23:07:19 CEST 2013 spamd.service - Daemonized version of spamassassin Loaded: loaded (/usr/lib/systemd/system/spamd.service; enabled) Active: active (running) since Sat, 2013-06-15 23:06:11 CEST; 1min 8s ago Process: 31800 ExecStart=/usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid (code=exited, status=0/SUCCESS) Process: 31796 ExecStartPre=/bin/echo Starting spamd: (code=exited, status=0/SUCCESS) Main PID: 31802 (/usr/sbin/spamd) CGroup: name=systemd:/system/spamd.service ├ 31802 /usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid ├ 31805 spamd child └ 31806 spamd child
Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test FROM_12LTRDOM has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test HDRS_LCASE has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: rules: meta test TBIRD_SPOOF has dependency 'ALL_TRUSTED' with a zero score Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server started on port 783/tcp (running version 3.3.2) Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server pid: 31802 Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server successfully spawned child process, pid 31805 Jun 15 23:06:11 Telcontar.valinor systemd[1]: Started Daemonized version of spamassassin. Jun 15 23:06:11 Telcontar.valinor spamd[31802]: spamd: server successfully spawned child process, pid 31806 Jun 15 23:06:11 Telcontar.valinor spamd[31802]: prefork: child states: IS Jun 15 23:06:11 Telcontar.valinor spamd[31802]: prefork: child states: II Telcontar:~ #
Telcontar:~ # ps afxu | grep spamd root 31872 0.0 0.0 7048 860 pts/21 S+ 23:09 0:00 | | \_ grep --color=auto spamd root 31802 0.6 0.7 144792 59876 ? Ss 23:06 0:01 /usr/sbin/spamd -d -c --max-children=6 -r /var/run/spamd.pid root 31805 0.0 0.7 144792 57492 ? S 23:06 0:00 \_ spamd child root 31806 0.0 0.7 144792 57476 ? S 23:06 0:00 \_ spamd child Telcontar:~ #
So indeed, the variable was not expanded, because me editing it works. Why? Bug? Surprising, after several months of release... -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)