Re: Install a `service'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 04 December 2002 11:01 pm, Harry Putnam wrote:
> Pretty sure I recall being able to put an init script in
> /etc/rc.d/init.d  and then that script would be seen by such tools as
> chkconfig  setup  ntsysv would see it and be be able to setup the
> symlink.
>
> That doesn't seem to work for me now.
>
> I've built a cvs source for spamassassin, and installed an init
> script -  /etc/rc.d/init.d/spamassassin
>
>   ls -l /etc/rc.d/init.d/spamassassin
> -rwxr-xr-x 1 root root 1220 Sep 10 00:22 /etc/rc.d/init.d/spamassassin
>
> This script actually works when called with
>   service spamassassin status/start/restart etc
>
> But isn't seen by the above mentioned tools.

You need to include comments that chkconfig understands at the top of the 
file. I have one here I set up to start my firewall.

# head -15 /etc/init.d/firewall
#!/bin/sh

##################################################################
#
## firewall.iptables.dual -- Version 1.22
#
##################################################################

# chkconfig: 2345 11 89
# description: starts an iptables based firewall

# Source 'em up
. /etc/init.d/functions


Once created, use 
chkconfig --add name
chkconfig name on

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3}|8.0 in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE97tTSn/07WoAb/SsRAnxCAKCP3B39qEHgQ0UFMRT+Ws1YD8PW7QCglLKa
2Tuis43HH2sJQuggQ3uJFZ4=
=rjee
-----END PGP SIGNATURE-----



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux