All a shell script basically is, is to submit each line in it to the command processor. So, I repeat my suggestion that you enter each line and see which one it crashes on. Or, turn echoing on, I'm not sure how to do that as I'm not at my PC. That way you see each line echoed before it is processed.
#! /bin/csh -f
set port = 8000
if ( "$1" != "" ) set port="$1"
cd ../area
nohup
nice
#limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end
date > $logfile
date > ../area/boot.txt
set matches = `netstat -an | grep ":$port " | grep -c LISTEN`
if ( $matches >= 1 ) then
echo Port $port is already in use.
exit 0
endif
../src/toto $port >&! $logfile
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 10
end
I even tried getting a startup script from another mud on the server (I help out on their mud too) - theirs works for them, but not for me.
I have already tried removing the '-f' from the csh, and I enter csh when I type 'csh', so it's definitely there.
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.