LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2008, 10:43 AM   #1
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
ClamAV start on boot


Hi all,

I have ClamAV installed on my server for email scanning. How do I get amavisd and spamd to start with the system considering I need to start spamd with its -d option.

Thanks in advance
 
Old 10-08-2008, 09:00 PM   #2
cygnal
LQ Newbie
 
Registered: May 2007
Distribution: Slackware/Debian
Posts: 26

Rep: Reputation: 15
What distro are you running?
Essentially, you want to either edit the entries for both services in /etc/rc.d/rcNUMBER.d (where NUMBER is the number of the runlevel you want to affect) or, if they don't exist, create them. Fedora and RedHat simplify this by using 'chkconfig' to control what services start automatically for what runlevels.

The /etc directories rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d contain soft links to the startup scripts in /etc/init.d. They are named after the names of the scripts they link to, with either a capital S or K and a two-digit number between 01 and 99 prepended: for instance, a shortcut to /etc/init.d/httpd would be /etc/rc3.d/S85httpd. Those with an S will start on bootup, those with a K will not. The number designates the order in which the services start. A link to /etc/init.d/httpd that would start the httpd daemon automatically upon entering runlevel 3 would be /etc/rc3.d/S85httpd; to disable it manually rename it to K15httpd (notice the change in number, the number following the K is the number following the S subtracted from 100). You can also do it the cheap way and add calls to the binaries in /etc/rc.local, which contains a list of stuff executed after booting into all multi-user runlevels.

This method is kind of a hassle; chkconfig not only allows you to be lazier but cuts down on room for human error as well. If you have Fedora or RedHat I'd recommend using chkconfig, if not, get familiar with the ln command and basic shell scripting.

Last edited by cygnal; 10-08-2008 at 09:06 PM.
 
Old 10-08-2008, 09:43 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
He's on CentOS 5 (at least on another post he was).

It depends on how you installed stuff.

If you'd used yum, then all you would need to do is type

chkconfig amavisd on (ditto for clamd and spammassassin in place of amavisd).

However, if you've installed from source (which I think you have), then you will need to copy the init scripts to /etc/init.s (see if they are there already, they will probably be called "amavisd", etc). You can then use

chkconfig --add amavisd (making sure the file name matches the one in /etc/init, ditto for the other two apps).
 
Old 10-09-2008, 03:52 AM   #4
glyn3332
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
Cheers guys. And it is CentOS 5 sorry for leaving that out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get ndiswrapper to start on boot AceofSpades19 Fedora 2 08-25-2007 02:03 PM
Why does 'Find' start after boot up? lumix Linux - General 4 04-11-2007 01:48 PM
Create a boot CD (start up disc) to reinstall boot loader Red Hat 9 johnnylinux Linux - Laptop and Netbook 2 08-03-2006 10:19 AM
start samba on boot dvdljns SUSE / openSUSE 1 05-18-2005 11:05 AM
starting clamav at boot! kudos Linux - General 3 01-14-2003 05:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration