script to turn off services

inode0 inode0 at gmail.com
Wed Aug 16 21:36:40 UTC 2006


On 8/16/06, Wayne Pinette <Wpinette at tru.ca> wrote:
> rather than use service <servicename>  I would use
> /etc/init.d/<servicename> status
>
>
> try /etc/init.d/bluetooth status.  That usually gives you back a string
> which tells you if it is running or not.
>
> Then you can call /etc/init.d/bluetooth stop  and chkconfig bluetooth
> off

I really hate to disagree with someone who agrees with me, but ...

It seems to me there are only advantages of running the service
script. It more gracefully handles odd cases like services that don't
exist (although grace and elegance is in the eye of the beholder). In
the case that the script for a service does exist it just does what
you suggest above although it makes sure it runs the initscript in a
sane environment. I don't see the downside to using the service script
in general.

John




More information about the redhat-list mailing list