LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Start Program Script (https://www.linuxquestions.org/questions/linux-newbie-8/start-program-script-82776/)

Cafrow 08-17-2003 04:55 AM

Start Program Script
 
I have Apache and MySQL isntalled on my computer, i to write a small script that will let me start them, I know the bash commands, I just need to know what to write them in, what is the best way to do it, i just want to be able to click or execute a file and have that file start the 2 servers

davee 08-17-2003 05:26 AM

You've several ways of doing this.

The simplest is, as you say, create a small bash script. Create a file with a text editor. Line one should read:

#!/bin/bash

...then follow it with the two commands you need to run. (with absolute paths)

Save the file. Then:

chmod 755 <filename>

to make it executable. Save (or link) it somewhere in your path and run as necessary.

You may want to create another script to shut the services down.

There are, however, better ways to run apache, and presumably mysql. Check this site or the jakarta site for details/tutorials.

Dave


All times are GMT -5. The time now is 03:13 PM.