Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



Best way to run a few commands at once?

daniel161
04-01-2009, 09:03 PM
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?


Thanks!


--Daniel L

Bluemouse
04-01-2009, 09:08 PM
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 ;)

Ad
04-01-2009, 09:08 PM
  

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Weekend tech reading: How to run Chrome OS as a virtual machine

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

More Tech News

  
 Software Downloads

WinDVD 10.05 Pro 2010 (formerly WinDVD Platinum)

Opera 10.10 for Windows

Mp3tag 2.45

FinalBurner 2.15

Google Chrome 4.0.249.00 Beta

Magic DVD Creator 11.0.10.189

Dynamic Notes 3.44

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.