The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Run shell command from WHM

Discussion in 'General Discussion' started by yoachan, Apr 20, 2011.

  1. yoachan

    yoachan Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Dear all,

    are WHM able to run shell command?
    What I mean is like Webmin's "Command Shell" which allow us to type command there and that command will be executed just like if we put those command on a command shell.

    Does WHM has this feature?

    My basic need was able to stop and start services (instead of just restart as WHM offered), include start, stop, and restart lighty which not supported by WHM.

    Currently I need to open an SSH to execute command like
    Code:
    # /sbin/service httpd stop
    # /sbin/service lighttpd restart
    
    I'll be very neat if I can type those command and run it directly from WHM.

    Why I won't bother to open a simple SSH terminal? Because in some worse scenario (which happens few days ago), SSH login were failed due too load was too high so I always got timed out.... But WHM were managed to login even though takes quite some time to load.

    regards,

    yoachan
     
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    Currently there is no such options in WHM.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    Thats cool. Thanks for the info. Will give a try for sure.
     
  5. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    hello,

    we are using this tool, but i did not find where to restart such service.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    At the link above are several images of the interface. Check the 3rd image showing the Command line area at bottom of UI. This is where you would type a command to restart your service.
     
  7. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    I got it & i typed this /scripts/restartsrv exim at command line & click on the send button how do i ensure exim has restarted ?? since there is no process after clicking on that.
     
  8. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Sorry guys

    it look some time, I just seen that page & came to know that exim has restarted.

    Sorry again.
     
  9. yoachan

    yoachan Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    @All:
    So sorry for my delay to reply on this thread.

    @Infopro: thanks for the info.
    Yes it will work, but the "file explorer" thing looks scary if we accidentally click the wrong button.
    But I think the "command line" part will work like a charm as we needed.
    Thanks :)

    @crazyaboutlinux & LinuxTechie: Glad that u find this thread useful too :D
     
  10. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello Yoachan,

    Yes the thread was useful. Thanks for opening the thread !
     
Loading...

Share This Page