Re: [exim] start exim at boot

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nigel Wade
Date:  
À: exim-users
Sujet: Re: [exim] start exim at boot
Souza Simbota wrote:
> Hello,
>
>
>
> Am running exim-4.66 on Red Hat 4. There is a script in /etc/init.d/exim
> that is suppose to ran exim at boot but exim is not starting. What could be
> the prob?
>
>


RedHat doesn't run scripts from /etc/init.d. That is just a repository
for the scripts. What gets executed depends on the run-level that is
being exited and/or entered. For each run level there is a directory
/etc/rc<runlevel>.d containing scripts (which are normally symbolic
links to scripts in /etc/init.d). Startup scripts run when entering a
particular runlevel are preceded with an S, and shutdown/kill script run
when exiting a run level are preceded with a K.

RedHat uses chkconfig to setup runlevel scripts. The base script in
/etc/init.d should contain information which chkconfig uses to control
which run-level directory the script is linked into, and at what point
in the run-level initialization/shutdown the script is run. In my exim
script there is the line:
# chkconfig: 2345 80 30
which says that exim will be started in run-levels 2,3,4 and 5. That its
start order is "80" and kill order is "30". These are some of the links
created by chkconfig:
lrwxrwxrwx /etc/rc1.d/K30exim -> ../init.d/exim
lrwxrwxrwx /etc/rc2.d/S80exim -> ../init.d/exim

To add your /etc/init.d/exim script to the chkconfig setup add the 
chkconfig line and a description, e.g.:
# chkconfig: 2345 80 30
# description: Exim is a Mail Transport Agent, which is the program \
#              that moves mail from one machine to another.


Then run:
# chkconfig --add exim

Man chkconfig for more details.

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555