Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ Startup script

Startup script

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Kuru   (9 posts)  Bio
Date Mon 09 Aug 2004 04:56 AM (UTC)
Message
I have a shell and all the files were transfered to it. Now I can't seem to startup the mud... none of the commands I've seen such as: .startup, ../src/smaug 4000 &, and tcsh startup. Could someone please help me? Heres the startup script if you need it.

#! /bin/csh -f

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

# Change to area directory.
cd ../area

# Set limits.
nohup
#limit stacksize 1024k
#limit coredumpsize 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.
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end

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

# Run SMAUG.
# Check if already running
set matches = `netstat -an | grep ":$port " | grep -c LISTEN`
if ( $matches >= 1 ) then
# Already running
echo Port $port is already in use.
exit 0
endif
../src/smaug $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
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Mon 09 Aug 2004 05:05 AM (UTC)
Message
Okay, but what we really need to know is the error you are getting.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #2 on Mon 09 Aug 2004 05:31 AM (UTC)

Amended on Thu 26 Apr 2007 08:51 PM (UTC) by Kuru

Message
@frostmud:~$ .startup
-bash: .startup: command not found

@frostmud:~/area$ ../src/smaug 8132 &
[1] 10863
@frostmud:~/area$ -bash: ../src/smaug: No such file or directory

@frostmud:~/area$ tcsh startup
startup: No such file or directory.

Thats what I got.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #3 on Mon 09 Aug 2004 05:36 AM (UTC)
Message
Okay, are you in the corret directory? Type 'ls' to view the files in the current directory. Not sure if this makes a difference, but try:

./startup 8132 &

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #4 on Mon 09 Aug 2004 05:41 AM (UTC)
Message
@frostmud:~$ ./startup 8132 &
[1] 11003
-bash: ./startup: No such file or directory
[1]+ Exit 127 ./startup 8132

@frostmud:~/src$ ./startup 8132 &
[1] 11008
-bash: ./startup: Permission denied
[1]+ Exit 126 ./startup 8132

@frostmud:~/area$ ./startup 8132 &
[1] 11004
-bash: ./startup: No such file or directory
[1]+ Exit 127 ./startup 8132

Thats what I got.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Mon 09 Aug 2004 05:46 AM (UTC)
Message
Ah, so you were in the wrong directory. Stay in the src directory, thats the correct one.

Nick has a guide to the startup script, it should answer your question:
http://www.gammon.com.au/smaug/howtocompile.htm#example

Try using tcsh.

If that doesn't work, then change the permissions with chmod.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #6 on Mon 09 Aug 2004 06:04 AM (UTC)
Message
I read the guide and it really didn't help me :/ I did what you said about the directories and it still gave me the same problems. Now how exactly do I use the chmod command?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #7 on Mon 09 Aug 2004 06:06 AM (UTC)
Message
Read the manual on chmod. I'm not sure what startup should originally be, as a permission.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #8 on Mon 09 Aug 2004 06:20 AM (UTC)
Message
Hmmm seems I'm getting somewhere... I never compiled in the sever, only on my computer, but when I recompiled on the sever I got a new file...

@frostmud:~/src$ ls
Makefile clans.c hashstr.c magic.c reset.c
act_comm.c color.c hiscores.c makeobjs.c save.c
act_info.c color.h hotboot.c mapout.c services.c
act_move.c comm.c hotboot.h misc.c shops.c
act_obj.c comments.c i3.c mpxset.c shutdown.txt
act_wiz.c const.c i3.h mud.h skills.c
backup.c db.c i3cfg.h mud_comm.c smaug*
ban.c deity.c ident.c mud_prog.c smaug.exe
bet.h fight.c imc.c o/ special.c
board.c finger.c imc.h planes.c startup
board.h finger.h imccfg.h planes.h tables.c
boards.c grub.c imm_host.c player.c track.c
build.c handler.c interp.c polymorph.c update.c

There was a never a file named 'smaug*' before, then just for curiosity I typed smaug and it started to boot up, but it couldn't since there were no area files. Then I went into the area dir and type ../src/smaug and it started, except there were 2 problems: 1) It started at port 4000 and 2) When I close the PuTTY window the mud shuts down. So it seems I still haven't figured out the problem with the startup script. :/
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #9 on Mon 09 Aug 2004 06:25 AM (UTC)

Amended on Mon 09 Aug 2004 06:26 AM (UTC) by Zeno

Message
Well what you could do for now, until you fix the startup problem, is in the area directory, start smaug:

../src/smaug 8132 &


The ampersand allows the program to run while the user is off.


[EDIT] Actually, try copying all of what is in the startup file, and delete the startup, then create a new startup script, and paste the old startup text.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #10 on Mon 09 Aug 2004 07:16 PM (UTC)
Message
Ok I got the mud up and running, but I'm not really sure how I make a new startup scirpt... as in the format. So any help?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #11 on Mon 09 Aug 2004 07:36 PM (UTC)
Message
Create a new file named 'startup' with any editor, like pico. Then copy the old startup script into the new one.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #12 on Tue 10 Aug 2004 04:36 PM (UTC)
Message
Ok I created a new startup script with metapad but the file is 'startup.txt'. I don't think thats the right file extension its suppose to have...
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #13 on Tue 10 Aug 2004 05:43 PM (UTC)
Message
No its not, its not suppose to have any extension.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Kuru   (9 posts)  Bio
Date Reply #14 on Tue 10 Aug 2004 06:02 PM (UTC)
Message
Ok I think I have almost every thing working. The startup script starts the mud like its suppose too, but as I said earlier when I close the PuTTY window the mud shutsdown also. Is there any way to fix this?
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.


45,778 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.