LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   chkconfig for starting and stopping services (https://www.linuxquestions.org/questions/linux-software-2/chkconfig-for-starting-and-stopping-services-4175429390/)

fakie_flip 09-28-2012 01:21 AM

chkconfig for starting and stopping services
 
I'm using CentOS 6.1. From the chkconfig man page, it says

"The on and off flags cause the service to be started or stopped"

As a test, I did this, but it didn't stop. What's going on here?

Code:

[root@alpha conf]# chkconfig --level 3 atd off
[root@alpha conf]# service atd status
atd (pid  2734) is running...
[root@alpha conf]# runlevel
N 3
[root@alpha conf]#

I know I can use service atd stop to stop it, but I'm trying to study the chkconfig command.

bathory 09-28-2012 02:23 AM

Hi,

chkconfig is used to specify what services are going to start/stop on spacific runlevels. From chkconfig manpage:
Quote:

chkconfig - updates and queries runlevel information for system services

Quote:

[root@alpha conf]# chkconfig --level 3 atd off
The command above makes atd not to start on boot at runlevel 3. It does not stop the service. To start/stop a service you use the service command as you've already mentioned.

Regards


All times are GMT -5. The time now is 03:13 PM.