seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2019/09/18, 00:45:44


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Spamassassin spamd doesn't start on boot  (Read 4688 times)

0 Members and 1 Guest are viewing this topic.

Offline vayu

  • User
  • Posts: 200
Spamassassin spamd doesn't start on boot
« 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?

Offline der_bud

  • User
  • Posts: 883
  • member
Re: Spamassassin spamd doesn't start on boot
« Reply #1 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?
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline vayu

  • User
  • Posts: 200
Re: Spamassassin spamd doesn't start on boot
« Reply #2 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


Offline der_bud

  • User
  • Posts: 883
  • member
Re: Spamassassin spamd doesn't start on boot
« Reply #3 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.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline vayu

  • User
  • Posts: 200
Re: Spamassassin spamd doesn't start on boot
« Reply #4 on: 2014/08/14, 21:53:32 »
Code: [Select]
systemctl enable spamassassin.service

Thanks! That worked.