|
|
|
|
 |

September 1st, 2006, 03:15 PM
|
|
Sergeant
|
|
Join Date: Mar 2004
Posts: 304
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

September 1st, 2006, 04:52 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
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!)
|

September 2nd, 2006, 03:04 AM
|
|
First Lieutenant
|
|
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Linux Admining
I'd recommend PuTTY, especially if your client desktop is Windows.
|

September 2nd, 2006, 05:08 PM
|
|
Corporal
|
|
Join Date: Jun 2006
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|
The Following User Says Thank You to Arker For This Useful Post:
|
|

September 2nd, 2006, 06:33 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
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!)
|
|
The Following User Says Thank You to Gandalf Parker For This Useful Post:
|
|

September 5th, 2006, 02:39 PM
|
|
Sergeant
|
|
Join Date: Mar 2004
Posts: 304
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

September 10th, 2006, 08:21 PM
|
 |
Second Lieutenant
|
|
Join Date: Sep 2004
Location: Zürich, Switzerland
Posts: 418
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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)
|

September 10th, 2006, 10:00 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Linux Admining
PRE hosting script
------------------
GAME="Armageddon"
DIR="/home/dom3/dominions3/savedgames/"$GAME
WEB="/home/dom3/public_html/games/"$GAME
# make backups
#maybe later I will make it rotating backups
zip -9 $GAME.zip $DIR/*
# blank the log file since it grows by about 5 meg each turn
# this way Im only logging one turn at a time
cp /dev/null $DIR/$GAME.log
# update the viewable copies of the shell files
cp /home/dom3/dominions3/$GAME.sh $WEB/$GAME_sh.txt
cp $DIR/pre_$GAME.sh $WEB/pre_$GAME_sh.txt
cp post_$GAME.sh $WEB/post_$GAME_sh.txt
# mark the time and load at the beginning of hosting
echo pre >>$DIR/system_load.txt
uptime >>$DIR/system_load.txt
__________________
-- 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!)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|