Spamassassin spamd doesn't start on boot

Started by vayu, 2014/08/14, 06:39:31

Previous topic - Next topic

vayu

I recently installed Spamassassin and it's working well but I have to start it everytime on boot up with "service spamassassin start".  A ps grep for spamd before doesn't show it loaded but after does and then it works fine for the rest of the day.  There is a spamassassin.service in /lib/systemd/system/ and there's also a script at /etc/init.d/spamassassin.  Could someone help me get spamassassin working automatically on start up?

der_bud

Please show us the content of the scripts/service-fiels you mention above. Do they have an [install]-section?
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

vayu

Here's the systemd script:
cat /lib/systemd/system/spamassassin.service
[Unit]
Description=Perl-based spam filter using text analysis

[Service]
Type=forking
PIDFile=/var/run/spamassassin.pid
EnvironmentFile=-/etc/default/spamassassin
ExecStart=/usr/sbin/spamd -d --pidfile=/var/run/spamassassin.pid $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target


Here's the init script:
cat /etc/init.d/spamassassin | siduction-paste
http://paste.siduction.org/20140814141404


der_bud

Normally the Install-section in the servicefile should work, so if you not only start it (that's one shot only) but enable it (that's kind of installation) with

systemctl enable spamassassin.service

it should be loaded by multi-user.target from then on.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

vayu