Hi "MB":

Thanks for the info. I was trying very much not to have OS specific
scripts but it looks like I will have to have a Linux specific
version just for the rc script.

Thanks again for the info.

Regards, Hugh

--
Hugh E Cruickshank, Forward Software, www.forward-software.com

> -----Original Message-----
> From: Vidiot
> Sent: Tuesday, April 30, 2002 1:31 PM
>
> >I have a script (fapsrv) that I use for starting and stopping a
> >set of Progress database servers from the init.d/rcX.d directories.
> >The script contains:
> >
> >    :
> >    STATE=$1
> >    RUNLEVEL=${RUNLEVEL:-`who -r | awk '{print $3}'`}
> >
> >    case ${STATE} in
> >
> >    'start')
> >            /usr/bin/fapdbstart
> >            ;;
> >    'stop')
> >            /usr/bin/fapdbstop -q
> >            ;;
> >    esac
> >
> >I normally would install the script to:
> >
> >   /etc/init.d/fapsrv
> >
> >(root/root 755) and then hard link it to:
> >
> >  /etc/rc0.d/K01fapsrv
> >  /etc/rc2.d/S99fapsrv
> >  /etc/rc3.d/S99fapsrv
> >  /etc/rc5.d/S99fapsrv
> >  /etc/rc6.d/K01fapsrv
> >
> >
> >The startup scripts (S99fapsrv) work fine but the shutdown scripts
> >(K01fapsrv) do not seem to execute at all. I have also tried
> >installing the shutdown scripts (K01fapsrv) in the rc2/3/5.d
> >directories but without any luck. For some reason the K01 scripts
> >are not being executed at all (I have added debugging lines to
> >check for this).
> >
> >Any thoughts or ideas would be greatly appreciated.
> >--
> >Hugh E Cruickshank, Forward Software, www.forward-software.com
>
> Get rid of the hard links and use Linux to manage it.
>
> At the top of your init.d script, add the following lines:
>
> #!/bin/bash
> #
> # sendmail      This shell script takes care of starting and stopping
> #               sendmail.
> #
> # chkconfig: 2345 80 30
> # description: Sendmail is a Mail Transport Agent, which is the program \
> #              that moves mail from one machine to another.
> # processname: sendmail
> # config: /etc/sendmail.cf
> # pidfile: /var/run/sendmail.pid
>
> Replace all of the appropriate pieces; sendmail, description, processname,
> config and pidfile with the appropriate descriptions.  Remove any that
> do not apply to your situation.
>
> In the chkconfig line, replace the 80 and 30 with the appropriate start
> and stop location values.  If your service needs to start after other
> certain services, see where those start and change the value here
> accordingly.
>
> The 2345 can be left as is.
>
> Now save the file.  Look at the man page for chkconfig.
>
> Now, because no links have been created yet for the various run levels,
> let's add it: chkconfig --add fapsrv
>
> When you do a "chkconfig --list" you'll see the init levels involved.
>
> Since you appear not to use run level 4, do this:
>
>       chkconfig --level 4 fapsrv off
>       chkconfig --list fapsrv
>
> You should now be set.  The chkconfig tool is very handy for
> managing these
> services.
>
> MB

[snip]
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to