LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2005, 09:28 AM   #1
bhmsi
LQ Newbie
 
Registered: Apr 2005
Location: Oklahoma USA
Posts: 4

Rep: Reputation: 0
Running scripts


Hello. I have set up a computer that I want to perform one task on (for now). Host a dedicated game server (its a long story). I'm running Fedora Core 3 and do not know how to use scripts. I do have the game running but it crashes with a segmentation fault after awhile. I have toyed with VNC so that I might be able to remote in and restart the game but I'm not always near a computer nor do I always know when it crashes. The server files came with what I thought was a script that will restart the game and give me a date and time as to when is crashed.

The filename for the script is Run_Linux_FMIII_DedServ.sh

Here are the contents of the script:

cd ..
./linuxjampded +set dedicated 2 +set fs_game ForceMod_III +exec ForceMod_III\fm3server.cfg

lastrestart=`/bin/date`;
cd ForceMod_III
echo "ForceMod III win32 server auto-restarted on $lastrestart" >> ./ForceMod_III_dedRestart.txt ;

./Run_Linux_FMIII_DedServ.sh

How do I run this script and do I need to create ForceMod_III_dedRestart.txt or will Linux create it the first time it is written to?

Last edited by bhmsi; 04-22-2005 at 09:35 AM.
 
Old 04-22-2005, 09:37 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
go into the directory that contains te script, then type
Code:
./Run_Linux_FMIII_DedServ.sh
to run the script
 
Old 04-22-2005, 02:40 PM   #3
ky-lab_rat
Member
 
Registered: Jan 2004
Posts: 44

Rep: Reputation: 15
Also you will probably have to

Code:
chmod +x Run_Linux_FMIII_DedServ.sh
To make the script executable also add

Code:
#!/bin/bash
To the top of the script or what ever shell you are running in.
 
Old 04-23-2005, 02:27 AM   #4
bhmsi
LQ Newbie
 
Registered: Apr 2005
Location: Oklahoma USA
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a million

Ok, I can start the server with that command. I'll have to wait and see what happens on the next crash. I will keep everyone posted.

Last edited by bhmsi; 04-23-2005 at 02:35 AM.
 
Old 04-23-2005, 11:42 AM   #5
bhmsi
LQ Newbie
 
Registered: Apr 2005
Location: Oklahoma USA
Posts: 4

Original Poster
Rep: Reputation: 0
Bummer

The server restarted during the night (another segmentation fault). The script did not restart the server though. Here is the reponse from the program:

./Run_Linux_FMIII_DedServ.sh: line 7: ./Run_Linux_FMIII_DedServ.sh: Permission denied

Where do I go from here?

Thanks.
 
Old 04-23-2005, 02:46 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
what is the permissions for that file?
 
Old 04-23-2005, 07:05 PM   #7
bhmsi
LQ Newbie
 
Registered: Apr 2005
Location: Oklahoma USA
Posts: 4

Original Poster
Rep: Reputation: 0
The Permissions tab shows File owner: root and File groug: root. There are check marks as follows:

Owner: Read Write Execute
Group: Read Execute
Others: Read Execute

No special flags are set.
Text view: -rwxr-xr-x
Number view: 755
Last Changed: Sat 23 Apr 2005 01:47:33 AM CDT

I really appreciate your patience with me. I am so used to Windows and this seems really hard to me at times.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running scripts moeru Linux - Software 10 07-02-2004 10:42 AM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 01:56 PM
Running scripts crash_zero Mandriva 5 04-19-2004 03:23 PM
running shell scripts salparadise Linux - Newbie 2 12-21-2002 06:40 AM
Help Running Scripts josefalero Linux - Newbie 2 11-14-2002 05:36 PM


All times are GMT -5. The time now is 01:09 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration