LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running scripts (https://www.linuxquestions.org/questions/linux-newbie-8/running-scripts-316026/)

bhmsi 04-22-2005 09:28 AM

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?

SciYro 04-22-2005 09:37 AM

go into the directory that contains te script, then type
Code:

./Run_Linux_FMIII_DedServ.sh
to run the script

ky-lab_rat 04-22-2005 02:40 PM

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.

bhmsi 04-23-2005 02:27 AM

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.

bhmsi 04-23-2005 11:42 AM

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.

SciYro 04-23-2005 02:46 PM

what is the permissions for that file?

bhmsi 04-23-2005 07:05 PM

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.


All times are GMT -5. The time now is 07:57 PM.