Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.