Stopping PennMUSH server from outside

Posted by MysticTymes on Mon 03 Nov 2003 03:58 AM — 2 posts, 11,933 views.

USA #0
Been running PennMush for a while now, and I absolutly LOVE it!

I run my own Linux server and on occasion I have to reboot it when upgrading certain things..

When I do this, PennMush, becasue it was not @Shutdown from inside the mush by a user actually logged in, it does a recover from panic_dump when the server reloads and runs the restart script.

I know how to start the thing by running /game/restart script, but how do I stop it from my rc.6 (linux runlevel 6 shutdown script) without actually logging into the game and doing @SHUTDOWN?

Thanx in advance,
MysticTymes

USA #1
Well, to do this "properly" would require lots of coding, to do things like the requests feature that SMAUG sort of has.

One way around this, however, would be to have a little Unix script that opened a telnet application, and fed into it the lines necessary to log in, enter password, and enter @shutdown. I think that's done using standard input redirection, which is < as I remember.

e.g. telnet localhost 1234 < mycommands.txt


So, your Linux shutdown would either run a script containing that line, and needing the mycommands.txt file, or you would run the whole deal in one line, but I don't know if that's possible.

I don't know how it goes on a MUSH, but on SMAUG the mycommands.txt file would look something like:

myCharacterName
myPassword
(newline here to pass MOTD)
shutdown mud now

Or something like that.

Hope this helps. :)