How do I write a script (batch file)??
I want to write a script/batch file (I am new to Linux so not sure what it should be called) that will start lampp. The command is /opt/lampp/lampp start and it must be executed as root.
I would prefer to have it start at system start-up, but alternatively I could launch it using a script. How can I do this? Thanks Cobus |
open a text file, write the lines, save the file. there, you have a script. you'd probably also want to make it directly executable (chmod +x scriptname). i also assume suse uses /etc/rc.local which you can use to run system wide commands on boot.
|
No need to "write a script".
Just put that command /opt/lampp/lampp start as the last line of the file /etc/rc.d/rc.local and it will be ecexuted (as root) the next time you boot HTH |
If you are used to dos style script writing, your in for a pleasent surprise with bash scripts.
http://www.tldp.org/LDP/abs/html/ Very fun, very useful. regards, ...drkstr |
Thank you for all the replies. tredegar, I'll try your method first as that is what I want to do, start the servers automatically at system start.
Thanks again. Cobus |
All times are GMT -5. The time now is 05:42 AM. |