Lame problems...

Posted by Aqueus on Wed 17 Jan 2007 03:02 AM — 6 posts, 25,217 views.

USA #0
For those of you just tuning in I had a LOT of issues getting copyover to work, so we're switching to DBS and seeing what we can rip out to make it our own. (Though nothing vital this time. We've chained our head coder up and are holding his shell rights for ransom.)

So the problem is: SMAUG is starting up and not the new codebase I'm trying to launch. I checked my ser... y'know what? I bet you guys have the answer, I'm not going to explain the rigors I went through to try and find out how to switch what MUD starts up, if someone could just give me a little help... =)

Also: the WIKI-thing on all the SMAUG commands ROCKS. Aaand... that's it.
USA #1
Make sure the stock Smaug MUD is shutdown (and so is startup script from it). Then run the startup script for DBS.
USA #2
Are you typing startup from the right directory?
USA #3
Well, I typed 'shutdown mud now' so the SMAUG MUD is shut down...

Now... how do I get the DBS MUD up?

./startup isn't working... I tried executing it and it saaaid:

[XXXX@indecent src]$ ./startup &
[1] 8495
-bash: ./startup: Permission denied

As a note, the port is set to 1122, which is the proper port for us.

The entire startup file is here:

#!/bin/csh -f

# Set the port number.
set port = 1122
if ( "$1" != "" ) set port="$1"

# Change to area directory.
cd ../area

# Set limits.
nohup
nice
limit stack 1024k
ulimit -Sc unlimited
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.

# rm ../log/syslog.9
# We have space to archive old log files now...
if ( -e ../log/syslog.9 ) then
set index = 1000
while ( 1 )
set archivefile = ../log/archived/$index.log
if ( ! -e $archivefile ) break
@ index++
end
mv ../log/syslog.9 $archivefile
endif

mv ../log/syslog.8 ../log/syslog.9
mv ../log/syslog.7 ../log/syslog.8
mv ../log/syslog.6 ../log/syslog.7
mv ../log/syslog.5 ../log/syslog.6
mv ../log/syslog.4 ../log/syslog.5
mv ../log/syslog.3 ../log/syslog.4
mv ../log/syslog.2 ../log/syslog.3
mv ../log/syslog.1 ../log/syslog.2
mv ../log/syslog.log ../log/syslog.1
#touch ../log/syslog.log

# start DBSaga tarball backup
# cd ../../
# mv backup/dbsbackup.current.tar.gz backup/dbsbackup.previous.tar.gz
# tar -czf backup/dbsbackup.current.tar.gz -X backup/exclude.list ./dbs
# cd dbs/area
cd ../area
# end DBSaga tarball backup

cp ../system/hiscores.dat ../system/hiscores.bak

set logfile = ../log/syslog.log

# Record starting time
date > $logfile
date > ../area/boot.txt

# Record initial charges
# charges >> $logfile

# Run SMAUG.
# NO! Run DBSaga!
../src/dbsaga $port >&! $logfile

# ../src/smaug 7654 >&! $logfile
# ../src/smaug $port >&! $logfile
# ../src/smaug >>&! $logfile

# Record ending charges
# charges >> $logfile

# # Delete this out if no adb.
# if ( -e core ) then
# echo '$c' | adb ../src/smaug
# endif

# Let's see if this works...
# Using old index value, would be nice to have
# it be the date for the file name
if ( -e core ) then
set index = 1000
while ( 1 )
set crashfile = ../crash/$index.crash
if ( ! -e $crashfile ) break
@ index++
end
\mv core ../src
cd ../src
date > $crashfile
gdb -batch -x commands dbsaga core >> $crashfile
# mv core ../crash/core.$index
rm -f core
cd ../area
endif

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

Amended on Wed 17 Jan 2007 05:25 AM by Aqueus
USA #4
chmod startup to the correct perms (777?).
USA #5
chmod +x startup


Edit:
This means:
chmod (change mode) +x (by adding the executable flag) startup (the file to change)