Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    83

    Default How do you restart services from shell?

    Hi,
    quick question - how do you restart services from ssh command line, such as Apache and exim and MySQL and all th rest - just like in WHM? Reason I ask is I'm writing a process monitoring script that will restart services if the load gets too high, if that fails then it'll reboot the server. I am going to make it more complicated later on - where it kills off individual processes that are actually causing the problem - but for now can some help me out with this first step.

    What are the simple commands to restart the services, I've looked eveywhere can't find the commands anywhere

    Or alternatively where are the restart scripts in WHM stored? could just run these.
    Last edited by bjdea1; 06-17-2004 at 11:12 AM.

  2. #2
    Member
    Join Date
    Mar 2003
    Posts
    83

    Default found em

    Nevermind - I found the answer already - all the restarting commands are in /etc/rc.d/init.d directory

  3. #3
    Member
    Join Date
    Jun 2002
    Posts
    116

    Default

    Also scripts in there using RH can be called with

    service <service name> <args>

    I.e.

    service httpd restart

  4. #4
    Member
    Join Date
    Mar 2002
    Posts
    159

    Default

    You can also use the CPanel scripts as they give you a tail of the logs after restarting.

    cd /scripts
    ./restartsrv servicename
    FastServerManagement
    24x7x365 CPanel Server Management & Monitoring only $29.00/month
    http://www.FastServerManagement.com
    sales@FastServerManagement.com 1-877-898-1423

Similar Threads & Tags
Similar threads

  1. Restart Services?
    By jhyland87 in forum cPanel Developers
    Replies: 5
    Last Post: 06-24-2009, 01:36 PM
  2. Restart Services - are these all graceful?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-12-2007, 05:17 PM
  3. restart services
    By shanit in forum New User Questions
    Replies: 6
    Last Post: 12-21-2005, 10:37 AM
  4. Restart Services (ProFTPd) ???
    By flash7 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-10-2004, 02:09 AM
  5. Restart Services Not Working
    By Lamar in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-29-2003, 04:03 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube