Siduction Forum

Siduction Forum => Software - Support => Topic started by: vayu on 2014/08/14, 06:39:31

Title: Spamassassin spamd doesn't start on boot
Post by: vayu on 2014/08/14, 06:39:31
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?
Title: Re: Spamassassin spamd doesn't start on boot
Post by: der_bud on 2014/08/14, 11:02:36
Please show us the content of the scripts/service-fiels you mention above. Do they have an [install]-section?
Title: Re: Spamassassin spamd doesn't start on boot
Post by: vayu on 2014/08/14, 16:15:29
Here's the systemd script:
cat /lib/systemd/system/spamassassin.service
Code: [Select]
[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 (http://paste.siduction.org/20140814141404)

Title: Re: Spamassassin spamd doesn't start on boot
Post by: der_bud on 2014/08/14, 21:11:26
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
Code: [Select]
systemctl enable spamassassin.service
it should be loaded by multi-user.target from then on.
Title: Re: Spamassassin spamd doesn't start on boot
Post by: vayu on 2014/08/14, 21:53:32
Code: [Select]
systemctl enable spamassassin.service

Thanks! That worked.