LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2002, 10:48 AM   #1
yukaputz
LQ Newbie
 
Registered: Dec 2002
Posts: 1

Rep: Reputation: 0
Scripting noob question.


OS: RH8

I made a script to start my counter strike server and my web server.

Here is the script

#1/bin/bash
service httpd restart
export LD_LIBRARY_PATH=/halflife/hldsI:$LD_LIBRARY_PATH
./hlds_run -game cstrike +ip xxx.xxx.xxx.xxx +maxplayers 16 +map cs_747


Question 1:

Line 4 needs to be executed in a specific directory. How do I do that?

Question 2:

How do I make this script autostart each time the server is rebooted?

-Yukaputz
 
Old 12-27-2002, 11:01 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
1. Just type the path of the directory in front of where the command is run in, instead of just service httpd restart

2. Throw it in your startup scripts usually found in your /etc/rc.d with whatever runlevel your server starts in.. or usually can be thrown into your rc.local file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting question mithereal Linux - General 2 09-21-2005 02:02 AM
Scripting Question Darklight451 Linux - Newbie 4 11-12-2004 11:14 AM
noob with a noob question phoonerorlater Linux - Newbie 2 09-29-2004 03:43 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 12:03 AM
New to Scripting question s&j Linux - General 2 06-25-2002 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration