[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Running the server
. . -> [Subject]  Startup Script help
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Startup Script help

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Cozzmolot   (3 posts)  [Biography] bio
Date Sat 08 Jan 2005 07:56 AM (UTC)  quote  ]
Message
Ok, I've spent a couple of days trying to figure this problem out myself, and it is just time ot turn to help. I am able to run my mud just fine using cheesy ways to get it to boot up .. i.e. ../src/rom 8445 etc. I need to use my startup script though so that I can restart and have log files etc.

Okay as of right now this is the errors I get when I boot up the mud the following ways:

cozzmolot@frostmud:~/QuickMUD/area$ ./startup &
[1] 8758
: bad interpreter: No such file or directory
[1]+ Exit 126 ./startup
cozzmolot@frostmud:~/QuickMUD/area$ startup &
[1] 8884
: bad interpreter: No such file or directory
[1]+ Exit 126 startup
cozzmolot@frostmud:~/QuickMUD/area$ ./startup 8445 &
[1] 8885
: bad interpreter: No such file or directory
[1]+ Exit 126 ./startup 8445
cozzmolot@frostmud:~/QuickMUD/area$ startup 8445 &
[1] 8886
: bad interpreter: No such file or directory
[1]+ Exit 126 startup 8445


and this is my script

#!/bin/tcsh
# Written by Furey.
# With additions from Tony and Alander.

# Set the port number.

set port = 8445
if ( "$1" != "" ) set port="$1"

# Change to area directory.
cd ../area

# Set limits.
if ( -e shutdown.txt ) rm -f shutdown.txt

while ( 1 )
# If you want to have logs in a different directory,
# change the 'set logfile' line to reflect the directory name.
set index = 1000
while ( 1 )
set logfile = ../log/${index}.log
if ( ! -e $logfile ) break
@ index++
end

# Run rom.
../src/rom $port >&! $logfile


# Restart, giving old connections a chance to die.
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 15
end

whats wrong here?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #1 on Sat 08 Jan 2005 08:32 AM (UTC)  quote  ]
Message
First problem, I don't think the startup script is supposed to be in area.

Second problem, it would appear that you don't have tcsh installed. Are you running on your own local installation of Cygwin? If so, install the tcsh package. If not, contact your system administrator and ask them (politely, of course :P) to install tcsh.

Somewhere on this forum, there are cases of people who didn't have tcsh and had to translate the startup script to another scripting language; maybe you'll find something there. I don't remember if the solution was posted or not.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Cozzmolot   (3 posts)  [Biography] bio
Date Reply #2 on Sat 08 Jan 2005 05:31 PM (UTC)  quote  ]
Message
no tcsh is installed. where else should it be put?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #3 on Sat 08 Jan 2005 05:54 PM (UTC)  quote  ]

Amended on Sat 08 Jan 2005 05:56 PM (UTC) by David Haley

Message
Alright, you need to install tcsh, then. See my above post for how to do that; let me know if you have trouble. And you'll also have to specify what kind of server you have etc.

As for the startup script, I think it belongs in the src directory; at least, that's how SMAUG does it. I don't know if ROM does it differently. Did you put that there, or was it there in the default package?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Cozzmolot   (3 posts)  [Biography] bio
Date Reply #4 on Sat 08 Jan 2005 06:29 PM (UTC)  quote  ]
Message
Sorry for the misunderstanding but TCSH IS installed. I'll try moving the startup file into different directorys and see if that helps.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #5 on Sat 08 Jan 2005 06:41 PM (UTC)  quote  ]
Message
Where was the startup script in the default package? That's where you'll want to put it.

What kind of system are you running? Where is tcsh installed? You'll have to make the first line of the startup script be the path to tcsh with a ! in front, e.g. !/bin/tcsh or !/usr/bin/tcsh or wherever tcsh is installed.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #6 on Mon 10 Jan 2005 11:39 AM (UTC)  quote  ]
Message
Rom appears to put the startup in the area directory. I have several Rom bases unpacked and that's where the script is in all of them.

As for how to find where tcsh is installed, on the command prompt, type:

which tcsh

It will respond with a path to the file. This works on Cygwin and Linux.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by Remy StVier   (1 post)  [Biography] bio
Date Reply #7 on Sat 22 Jan 2005 10:05 PM (UTC)  quote  ]
Message
Please share how you setup your makefile for cygwin?
[Go to top] top

Posted by Meerclar   USA  (591 posts)  [Biography] bio
Date Reply #8 on Sun 23 Jan 2005 02:59 AM (UTC)  quote  ]
Message
One of the more obvious things to check (as a programmer) that doesn't usually get checked until dead last is the script call for the executable. I notice the script is calling ../src/rom but you're running under cygwin so the file you should probably be calling is ../src/rom.exe - this one tends to be a recurring villan of sorts in cygwin startup scripts.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #9 on Sun 23 Jan 2005 05:03 AM (UTC)  quote  ]
Message
Quote:
this one tends to be a recurring villan of sorts in cygwin startup scripts.
I thought cygwin figured this out for you. I know that if I type 'babble' even though the exe is 'babble.exe', it works. Perhaps it doesn't work from inside scripts of the exec call, however, I don't believe I've tried it there.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


5,770 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]