Best way to run a few commands at once?

By daniel161
Apr 1, 2009
  1. Hey everyone,

    I have an IRC bot that I am setting up, to start it I have to go into SSH and type something like....

    cd location/
    NOHUP ./botapp

    Now that is not too hard in itself, but it gets tiring after a while to keep logging into SSH to get it going.

    Is it possible to get the script jump-started in PHP? And PHP execute these commands?

    Now I know PHP may not be the best option, but I just wanted to see if there is a better way to group the commands and possibly execute them at once. Possibly without having to login to SSH. Python script?


    --Daniel L
  2. Bluemouse

    Bluemouse TS Rookie Posts: 195

    Php can run linux commands.

    Why not just use a shell or bash script though? You could even set up a cronjob for it so it will run hourly/weekly/etc, or set it to run when you ssh in by adding it to your .bashrc file. Or you can have it set to run when your computer boots...

    Go with a shell script :) It's what it's there for ;)
Topic Status:
Not open for further replies.

Similar Topics

Create an account or login to comment

You need to be a member in order to leave a comment
TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...

Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.