.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old September 1st, 2006, 01:39 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Linux Admining

To answer the question in another thread that started this:

To admin remotely in text mode you have to login to a text-mode terminal. Two popular protocols are telnet and ssh. You can find terminal emulation programs that give you added features at your end which can be quite useful. I like NetTerm but its been a really REALLY long time since Ive looked at what was out there available.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)

Last edited by Gandalf Parker; August 26th, 2008 at 01:52 PM..
Reply With Quote
  #2  
Old September 1st, 2006, 01:51 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

Here is an example of a script I use to start a Dom3 game.
--------------------------
GAME=Armaggedon
PORT=7373

cd /home/dom3/dominions3
DIR=~/dominions3/savedgames/$GAME
mkdir $DIR

nice dom3 -T --makemap $GAME \
--mapaa --mapsize 1000 1000 --mapprov 250

nohup nice dom3 -g $GAME --port $PORT -STdddddddddd \
--preexec $DIR/pre_$GAME.sh \
--postexec $DIR/post_$GAME.sh \
--mapfile $GAME.map \
--era 3 --hofsize 15 --indepstr 6 \
--totalvp 18 --requiredvp 15 --summervp \
--magicsites 35 --renaming \
--hours 24 -q \
>>$DIR/$GAME.log 2>>$DIR/$GAME.err &

touch $DIR/pre_$GAME.sh
touch $DIR/post_$GAME.sh
chmod +x $DIR/*.sh
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
The Following User Says Thank You to Gandalf Parker For This Useful Post:
  #3  
Old September 1st, 2006, 02:02 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

It looks like alot but its simple to use. You just change the first two lines to start a new game. The GAME and PORT variables.

Then it makes a gamesave directory. I know that the game makes one once the game starts but I need it before that.

This script generates a random map for the game to use that is named the same as the game. In this case, Armageddon. Thats a new Dom3 feature. When people join the game they will get the map sent to them. There are many map switches if you want to mess with them. Just add them there.
Just insert a # and remark it out if you dont want a random map. Change the --mapfile setting from $GAME to whatever map you want to use.

The game call itself adds many things you might not want. the ddddd heavy level of debug creates HUGE logs but they are fun to look at. You can change that to one d or take it off completely. I direct all of the games text responses to a log and the errors to an err file named for the game. In this case Armaggedon.log and Armageddon.err

the last 3 lines make sure that you have a pre and post shell that are in the right place and executable. They start out empty but you can easily edit them anytime even if the game has already started. They are great for various cleanup or management needs that popup.

Digest that abit and then I will put up a more complicated one. >
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #4  
Old September 1st, 2006, 03:15 PM

tibbs tibbs is offline
Sergeant
 
Join Date: Mar 2004
Posts: 304
Thanks: 0
Thanked 0 Times in 0 Posts
tibbs is on a distinguished road
Default Re: Linux Admining

Thanks for all the useful info. I want to avoid using Telnet because it doesn't encrypt but I will look into NetTerm and SSH.

And this will take me a long time to digest. I just learned about the touch command and I think I need to re-read it because I have forgotten.

And it looks like I need to learn how to create scripts. This should keep me busy over the weekend.

Thanks,
Chris
Reply With Quote
  #5  
Old September 1st, 2006, 04:52 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

Any commands you can type in to run can be put into a text file. If you make it executable (chmod +x file) then it becomes a script. You only have to iron out all of the steps one time. Then you put them into a script and forget all that trial and error you did.

The touch was a trick. It usually updates the creation date. But if the file doesnt exist then it makes one. That way you safely create a file but if one is already there then you wont destroy it.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #6  
Old September 2nd, 2006, 03:04 AM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Linux Admining

I'd recommend PuTTY, especially if your client desktop is Windows.
Reply With Quote
  #7  
Old September 2nd, 2006, 05:08 PM

Arker Arker is offline
Corporal
 
Join Date: Jun 2006
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Arker is on a distinguished road
Default Re: Linux Admining

Quote:
Gandalf Parker said:
Any commands you can type in to run can be put into a text file. If you make it executable (chmod +x file) then it becomes a script.
It also helps to put the magic numbers in.

#!/bin/sh

should be the very first thing in the file.

And to make sure the permissions are right

chmod 755 file
Reply With Quote
The Following User Says Thank You to Arker For This Useful Post:
  #8  
Old September 2nd, 2006, 06:33 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

The script I did isnt shell specific. Some later ones I do have a shell line since they use special shell variables for things like randoms.

And yeah I guess for public info its probably best to chmod 755 but +x for executable seems easier for people to remember even if it is sloppy.

Of course for public info I probably shouldnt have mentioned telnet since trying to argue down ssh is something only security people would do.

So did everyone follow that script? No questions?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
The Following User Says Thank You to Gandalf Parker For This Useful Post:
  #9  
Old September 5th, 2006, 02:39 PM

tibbs tibbs is offline
Sergeant
 
Join Date: Mar 2004
Posts: 304
Thanks: 0
Thanked 0 Times in 0 Posts
tibbs is on a distinguished road
Default Re: Linux Admining

I didn't get a chance to try it yet. I was busy with painting a few rooms in the house. Hopefully early this week.
Reply With Quote
  #10  
Old September 10th, 2006, 08:21 PM
Bluebird's Avatar

Bluebird Bluebird is offline
Second Lieutenant
 
Join Date: Sep 2004
Location: Zürich, Switzerland
Posts: 418
Thanks: 0
Thanked 0 Times in 0 Posts
Bluebird is on a distinguished road
Default Re: Linux Admining

Just as a hint: I am normally hosting games on unix using the 'screen' command. It is a like a 'window manager' for text consoles and has many features (too many to list them here). The nicest one is that you can 'detach' a terminal session which continues running even if you logout, and later 'reattach' to that terminal session on next login.
__________________
There are roads which must not be followed, towns which must not be besieged, positions which must not be contested, commands of the sovereign which must not be obeyed. (Sun Tsu "The Art of War", ca. 500 BC)
Reply With Quote
Reply

Bookmarks

Tags
admin, automation, command line, hosting, linux, script, server, switches


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:49 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.