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

Re: script to turn off services



On 8/16/06, Wayne Pinette <Wpinette 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



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