Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How do I run a couple of commands after reboot?

Discussion in 'General Discussion' started by rs-freddo, Oct 8, 2006.

  1. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Anytime the server reboots I need to run a couple of commands, specifically:
    service mysql stop
    service mysql start

    I could probably just add these commands to a script - but where do I put the script so it runs after reboot? It should run last...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. jester.ro

    jester.ro Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2004
    Messages:
    304
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Bucharest, Romania
    cPanel Access Level:
    DataCenter Provider
    add the commands in /etc/rc.d/rc.local

    they will run after everithing else has started.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Thank you!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice