![]() |
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. |
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 |
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. >:) |
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 |
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. |
Re: Linux Admining
I'd recommend PuTTY, especially if your client desktop is Windows.
|
Re: Linux Admining
Quote:
#!/bin/sh should be the very first thing in the file. And to make sure the permissions are right chmod 755 file |
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? |
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.
|
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.
|
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 |
Re: Linux Admining
POST hosting script
------------------- $GAME="Armageddon" DIR="/home/dom3/dominions3/savedgames/"$GAME WEB="/home/dom3/public_html/games/"$GAME # mark time and system load after host processing #and make it available for viewing in the games web dir echo post >>$DIR/system_load.txt uptime >>$DIR/system_load.txt echo " " >>$DIR/system_load.txt cp $DIR/system_load.txt $WEB/system_load.txt # rotate the score html files mv $WEB/scores-4.html $WEB/scores-5.html mv $WEB/scores-3.html $WEB/scores-4.html mv $WEB/scores-2.html $WEB/scores-3.html mv $WEB/scores-1.html $WEB/scores-2.html mv $WEB/scores.html $WEB/scores-1.html cp $DIR/scores.html $WEB/scores.html cp $DIR/stats.txt $WEB/stats.txt # zip up the debug log and then zero the log zip -9 $DIR/$GAME.zip $DIR/$GAME.log mv $DIR/$GAME.zip $WEB/$GAME.zip cp $DIR/$GAME.log "$DIR/OLD"$GAME".log" cp /dev/null $DIR/$GAME.log # email notify players that have asked to be told of turns cat $DIR/notify.txt |/usr/sbin/sendmail gandalf@example.com cat $DIR/notify.txt |/usr/sbin/sendmail bogus@example.net |
Re: Linux Admining
the notify.txt that is sent to players
-------------------------------------- Subject: the Armageddon game processed Your turn is ready at dom3minions.com (courtesy of Gandalf Parker at Any1can.net) ---------------------------------------- the notification could also be changed to include the turn number. It could also easily be changed to include emailing the turn file. Which makes you automatically think PbEM. If a game had its own email address such as armageddon@dom3minons.com then something like procmail could manage incoming emails to place the .2h files (which means "to host") into the game directory. It could also kick off a script to check for all turns being in and then run/quit the host. This would raise the number of games that a server can run by many levels. |
Re: Linux Admining
I just realized that maybe this will interest some people....
Gandalf Parker usage: dom3 [option(s)] [gamename] options: -v --version Print version number and exit -d Increase debug level -g --host Generate new turn and exit --verify Verify all 2h-files and exit (creates .chk files) --statfile Create a player info file after each turn (stats.txt) --scoredump Create a score file after each turn (scores.html) --finalhost Generate new turn, send out final score msg and exit -c --nocredits Disables the end credits ******* Network Options ******* -C --tcpclient Connect to a Dominions multiplayer server -S --tcpserver Start a Dominions multiplayer server --ipadr XXX Use this IP-adr when connecting to server --port X Use this port nbr --preexec CMD Execute this command before each turn generation --postexec CMD Execute this command after each turn generation -t --hosttime X Y Host on day X (0=sunday) hour Y (0-23) --minutes X Set host interval in minutes -h --hours X Set host interval in hours --pauseday X Stop timer on this day (0=sunday) -q --quickhost Host as soon as all turns are done -n --nonationsel No nation selection when resuming a network game --noclientstart Clients cannot start the game during Choose Participants --uploadtime X Game is created after this many minutes. --uploadmaxp X Game is created if this many players join. --closed X Nation closed X=nation number (0-79) --easyai X Nation ai controlled X=nation number (0-79) --normai X Nation ai controlled X=nation number (0-79) --diffai X Nation ai controlled X=nation number (0-79) --mightyai X Nation ai controlled X=nation number (0-79) --impai X Nation ai controlled X=nation number (0-79) ******* New Game Options ******* --mapfile XXX Filename of map. E.g. eye.map --randmap X Make and use a random map with X prov per player (10,15,20) --research X Research difficulty 0-3 (default 1) --hofsize X Size of Hall of Fame 5-15 (default 10) --indepstr X Strength of Independents 0-9 (default 5) --magicsites X Magic site frequency 0-75 (default 40) --eventrarity X Random event rarity 1-2, 1=common 2=rare --totalvp X Vic. points available in the world 0-25 --capitalvp One extra victory per capital --requiredvp X Vic. points required for victory (default total/2) --summervp Vic. points are accumulated each summer --richness X Money multiple 50-300 (default 100) --resources X Resource multiple 50-300 (default 100) --supplies X Supply multiple 50-300 (default 100) --masterpass XX Master password. E.g. masterblaster --startprov X Number of starting provinces (1-9) --renaming Enable commander renaming --noscoregraphs Disable score graphs --nonationinfo No info at all on other nations --era X New game created in this era (1-3) -M --enablemod XXX Enable the mod with filename XXX ******* Random Map Options ******* --makemap XXX Generate a random map with filename XXX and exit --riverpart X 100 = normal amount of rivers, 0=no rivers --seapart X Percent of map that is below water level (default=30) --mountpart X Percent of map that is mountains (default=20) --forestpart X Percent of lands that are forests (default=20) --farmpart X Percent of lands that are farm lands (default=15) --wastepart X Percent of lands that are wastes (default=10) --swamppart X Percent of lands that are swamps (default=10) --mapaa Enable antialiasing for random maps --mapsize W H Set width and height of random map (default=1600 1200) --mapprov X Set number of provinces (default=150) --passmount Don't use impassable mountains on random maps --mapgcol RGBA Ground color 0-255 (default=170 146 116 255) --mapscol RGBA Sea color 0-255 (default=54 54 130 255) --mapbcol RGBA Ground border color 0-255 (x4) --mapsbcol RGBA Sea border color 0-255 (x4) --mapnoise X Ground color noise 0-255 (default 15) --borderwidth X Border width 0-500 (default 100) ******* Video Options ******* -w --window Run Dominions 3 in a window -u --fullscreen Use the entire screen --bitplanes X Try to use a color depth of X bits per pixel --zbuffer X Try to use a depth buffer of X bits per pixel (default=16) -T --textonly Use this with --tcpserver to get graphicless server --gamma X Set gamma function (brightness) 0.1 - 5.0 (default=1.0) --opacity X Set gui opacity 0 - 100 -r --res X Y Set screen resolution / window size (default=800 600) --animback Use animated backgrounds -a --noanimback Don't use animated backgrounds --fade Use fade effects -f --nofade No fade effects --nopopups No helpful popups --fps X Aim for this nbr of frames per second (default=20) --maxfps X Maximum nbr of frames per second (default=50) --filtering X Quality of OpenGL filtering 0-3 (default=2) --maxtexsize X Max texture size in pixels 32-4096 (default=unlimited) --treequal X Tree quality 1-5 (default=3) --texqual X Texture quality 1-5 (default=3) --nolightfx No light effects in battles --partamount X Max nbr of particles 0-8 (0=none, 4=default, 8=max) --nograss Don't draw the grass --noarcade Don't draw floating damage numbers --noglext Don't use any OpenGL extensions --vsync Enable vsync -V --novsync Disable vsync --renderpath X Use different optimizations 0-1 (0=good for low mem cards) -x --fastgrx Faster graphics (use 3 times for best performance (-xxx)) -p --perftest Run a performance test and exit ******* Audio Options ******* -s --nosound No sound effects or music -m --nomusic No music --musicvol X Set music volume, 0-100 --clickvol X Set mouse click volume, 0-100 --defsound Use default sound device --directsound Use direct sound --waveout Use waveout for sound Example: dom3 -wm Run Dominons 3 in a window and without music |
Re: Linux Admining
OK all of you Linux people. Have fun with THIS one. This is my bl_game.sh for creating small blitz games.
<font class="small">Code:</font><hr /><pre> #!/bin/bash OP1=`echo $RANDOM % 79|bc` OP2=`echo $RANDOM % 79|bc` OP3=`echo $RANDOM % 79|bc` for OP in $OP1 $OP2 $OP3 do if [ $OP -eq 25 ] then $OP=0 fi done PORT=7777 PTtest=1 until [ $PTtest -eq 0 ]; do PORT=`echo $RANDOM % 1000 + 8000|bc` PTtest=`netstat -an|grep -c :$PORT` done MPASS=`makepasswd` WURDnum=`echo $RANDOM$RANDOM % 118614 |bc` WURD=`egrep "^....$|^.....$|^......$|^.......$|^........$|^... ......$" \ /usr/share/dict/words|head -$WURDnum|tail -1` GAME=bl_$WURD MAP=eye.map DIR=~/dominions3/savedgames/$GAME ERA=$1 if [ -z "$1" ] then ERA=`echo $RANDOM % 3 + 1 |bc` fi DESC=" era $ERA game $GAME on port $PORT " echo $DESC #with $OP1 $OP2 $OP3 # --normai $OP1 --normai $OP2 --normai $OP3 \ dom3 -T --makemap $GAME --mapaa --mapsize 640 480 --mapprov 30 MAP=$GAME.map echo $DESC mkdir $DIR nohup dom3 -g $GAME --port $PORT -ST --statfile --scoredump \ --preexec $DIR/pre.sh --postexec $DIR/post.sh \ --era $ERA --indepstr 6 --hofsize 15 --magicsites 65 \ --renaming --mapfile $MAP --masterpass $MPASS \ -q --hours 24 >$DIR/game.log 2>$DIR/game.err & echo $DESC >>BLITZ_games.txt PID=`ps a | grep $GAME | grep dom3 | cut -d" " -f2` echo "kill -9 "$PID >$DIR/kill.sh echo $MPASS >$DIR/master.txt ls -blart /tmp/dominion* |tail -1 >$DIR/tmp.sh echo " " >$DIR/pre.sh echo " " >$DIR/post.sh chmod +x $DIR/*.sh # to stop the game immeadaitely after start # unremark the next line #cp $DIR/kill.sh $DIR/post.sh echo "mv ~/dominions3/maps/$GAME.* $DIR/" >$DIR/pre.sh echo "cp /dev/null $DIR/pre.sh" >>$DIR/pre.sh echo "cp $DIR/game.log $DIR/~game.log" >$DIR/post.sh echo "cp /dev/null $DIR/game.log" >>$DIR/post.sh </pre><hr /> |
Re: Linux Admining
Some highlists on that blitz script...
It selects random opponents (presently rem'd out in its use) It selects a random port and it tests to see if that port is in use It creates a random password and uses that as the master password for the game It chooses a random word from the system spelling dictionary and uses that as the game name (some very interesting results have come from that) It chooses a random era It creates a random map for the game of 640x480 and 30 provinces. Suitable for a 2 or 3 player blitz game It creates a game log and a game error file It adds the games description (game name, port, settings) to a BLITZ_games.txt so that if I whip off 10 quick new games I can just upload that text to announce them It creates a quick-kill shell in the games directory It creates pre and post shells. Sets up the pre shell to move the blitz map to the game directory once the game starts. That saves on cleanup of the games later. Sets up the post shell to rotate the logs which can get very large depending on how many d's you use on the games command line Any questions? |
Re: Linux Admining
Does the IP address need to be specified (in the script) if one is IP forwarding through a firewall? If so, the address needs to be the address that remote clients will be using, correct? I hope I got the terminology right.
Thank's! |
Re: Linux Admining
I understand your question but Im afraid that I dont know the answer. I dont know of any way to tell the game which IP to run on. I think that when hosting, the game only concerns itself with port. So if the clients address hits the firewall, and the firewall forwards it to the right machine, things should be transparent to the user. But Im afraid thats just guesswork on my part.
By the way, Dom3 handles both IP or domain name for the server. Thats something I have tested quite abit. So Im able to send people to either 63.199.8.158 OR dom3minions.com for a game. (also 63.199.8.157 host.dom3minions.com which I use for blitz games) |
Re: Linux Admining
Upon reflection, the whole IP thing is probably a switch issue not a computer issue anyhow - i.e. addyX:portZ internally is in all ways equivalent to addyY:portZ externally with IP forwarding setup. Should have thought of this last night, but it was late, and my networking knowledge is sporadic.
Thank's for the reply - I'll test out your scripts once Dom3 shows up hopefully next week. |
Re: Linux Admining
PbEM scripting has been ironed out. The key is two switches which will start a game hosting automatically. The thread where this was discussed fully is at
http://www.shrapnelcommunity.com/thr...amp;Forum=f187 The switches are: --uploadtime --uploadmaxp |
Re: Linux Admining
Im rather proud of this altho it will make others cringe at its ugliness. I wanted a way for people to check which games need players. Doing an "ls" of the game directory from a CGI was easy enough but I realized that instead of using "ls" of the directorys as fact that the game exists, I should use the "ps". Then starting a game will automatically cause it to show, and if a game finishes or crashes then it will automatically not appear. I also arranged for it to pull the port from the ps display and show that.
http://host.dom3minions.com/bin/blitz_chk.cgi <font class="small">Code:</font><hr /><pre> #!/bin/bash echo "Content-type: text/html" echo -e "\n\n" echo "<H2><b>Dominions 3 Blitz games</b></H2>" echo "These are 2-player games on tiny maps<br>" echo '<a href="http://host.dom3minions.com/how-to.html">how to join a game</a><b r><br>' cd /home/dom3/dominions3/savedgames ps ax |grep dom3|grep bl_ | \ while read n n n n n n game n port n n n n n n n n era n do echo "era $era game <b>$game</b> on port <b>$port</b><br>" cd $game for fyle in `ls -1 *.2h` do echo $fyle "<br>" done cd /home/dom3/dominions3/savedgames echo "<br>" done </pre><hr /> |
Re: Linux Admining
Not much reaction to the fancy stuff. Maybe I shoud move the other direction...
Here is the simplest way to start a game in linux text mode so that you can be the server.... dom3 -STq (take note that is a Q as in quick, not a G like in game) it will ask you what port to use.. it will ask you to name the game.. it will ask you what era the game should be for it will then wait for people to join and tell you each time someone does When one of the players hits the "start game" then it will stop to show you a list of all the maps on your machine numbered, then ask you to type in the number of the map you want to use. What it will NOT do is tell the machine to keep running the game in the background if you hang up your connection. I will cover that next. Gandalf Parker |
Re: Linux Admining
The simplest way to start a game in text mode on a linux server for continual running.. well there isnt one. The problem is that telling it to run continual and background tends to cut off your ability to answer the questions. I havent been able to get the answers to work coming from a text file with something like <input.txt. So you will need to provide the answers on one line.
The simplest line I can come up with is.. nohup dom3 -STq fastgame --port 9999 --mapfile eye.map --era 1 & (again thats a Q not a G) Of course you can change "fastgame" to any name you want, and 9999 to any port, eye.map to the map file for any map you have in the maps directory, and era to 1 2 or 3. If you want to play with adding other settings then type dom3 -h which will give you a text screen of all the switches. Gandalf Parker |
Re: Linux Admining
Great thread GP. I'm keen to run it from the text line and not have it running unattended - i.e always in a window. Is there a way of stopping it refreshing once a minute?
Also are there any commands you can give it whilst in text mode? Tals |
Re: Linux Admining
Sorry that I didnt notice this.
There is no way to stop it refreshing. I tend to run it to a file then use a file viewer. As far as I know there are no commands that will work on it when its running text mode. I prefer to script the starts of all of my games since any changes or updates involve having to stop the game and then restart it. I much prefer edting the script and restarting it than trying to type it all out again. Especially if you dont remember some of it. |
Re: Linux Admining
:bump:
Since this subject is coming up again I thought Id bump this. Gandalf Parker |
Re: Linux Admining
Hi,
We're trying to figure out is there a way to host dom3 from a server computer with identical cd-key as one of the players? Nothing illegal, but none of our friends want to keep server running 24/7 and we have an existing server which could be used. Thanks, nice thread |
Re: Linux Admining
Its not supposed to be a problem.
The host doesnt check its own key against the players. But Im pretty sure it does have to be a good key (cant use one off a public list since they get banned pretty quick). Ive used my own key with no trouble even when the host is on the linux server and Im playing from my windows desktop. |
Re: Linux Admining
My server wrapper and backup scripts. For this thread, I think the interesting bit is the backup script, since it's parametrized by game name.
Both scripts assume the game directory is ~/dominions3 The server wrapper passes all parameters directly to dom3. It only deals with the last parameter, which is assumed to be the name of the game. The wrapper is mainly for having a bunch of default parameters that I want to have all the time. The backup script writes the backups to ~/dominions/backups. It reads the scores.html file to determine current turn, so the game needs to be run with --scoredump on. dom3serv: Code:
#! /usr/bin/env python dom3backup: Code:
#! /bin/bash Edit: Regarding that unattendedness stuff, I run my server processes each in their own window under GNU screen, so they'll print their log to a terminal, but I don't have to have a local/remote login open all the time. But that's more a part of the fact that my setup currently requires me to start each game manually. |
Re: Linux Admining
Thanks G
|
Re: Linux Admining
Quote:
I will definetly copy them and use them as examples as I work on consolidating mine. My stuff grew over time and I have a script to start each game type, and a script to restart for each game type, and one to kill/delete for each game type, and one to search/display dead games which the players didnt bother to turn off. Not to mention the many version 1, version 2, test this, test that scripts. I really need to clean it all up and create larger scripts with options, I especailly like how you broke the common options from the newgame options for start and restart. |
Re: Linux Admining
For backups I like to end it with a mime emailing to an account on another system. Backup on the same device is handy, on another device (drive, tape, etc) is handier, and on a completely different system is way handier.
|
Re: Linux Admining
First game finished using server hosting.. man that was simple! A new question occurred however while planning a new game. According to this list: http://www.dom3minions.com/docs/CommandLine.txt, its not possible to assign more than 1 victory point / province. I'm planning to set up game with one 3-vp and three 2-vp provinces in addition to 10 regular 1-vp provinces.
Any ideas is this possible? How? Thanks already! |
Re: Linux Admining
I think you have to start the game using the GUI, then run it as a command line game once it's started. The detailed VP settings are curiously absent from the command line options.
|
Re: Linux Admining
Only time for quick answer. Ask if confusing.
For me, easiest is appending a few commands to the end of the games .map file http://www.dom3minions.com/docs/map_qref.txt If someone elses map, dupe to new name. It will use the same image file so not much work involved. -- per peer-pressure preoccupation My maps, mods, and mullings can be found at http://www.Dom3Minions.com |
Re: Linux Admining
Thanks llamabeast - I think it's not possible to use GUI in our case. Sounds really mysterious why such commands are not available. Any other options?
Apparently me and Gandalf replied at the same time - I'll look into his solution. Thanks! |
Re: Linux Admining
Im trying to make a working, simple backup option for a hosting script. How do the commands --postexec and --preexec commands work? At the moment my script looks like this? It works ok without the --postexec command. At the moment the game refuses to start up.
Code:
|
Re: Linux Admining
It's probably the [] characters in $BUP, if it's calling system() to run the postexec command then it won't work, because system() does a "/bin/sh -c":
Code:
$ /bin/sh -c ["/bin/ls -a"] I put my postexec commands in a script and that worked fine: Code:
$DOM3EXE $DOM3GAME \ Code:
-g --host Generate new turn and exit |
Re: Linux Admining
Thanks vfb. I'm almost there, you are correct, there is no need for "-g" command. At the moment the script looks like below. The game starts but when trying to play a turn it just closes the gamewindow. It also says "send, broken pipe"
Code:
#!/bin/bash |
Re: Linux Admining
Did you try this?
BUP="rsync -a /home/dom/dominions3/savedgames/* /backup/" |
Re: Linux Admining
Yeah, after that it asks for the game name and this happens.
Code:
-- Waiting for participants to connect -- , time left: 1 seconds |
Re: Linux Admining
I generally use pre.sh and post.sh
Also I think you want --preexec rather than --postexec Once the game hosts, saving a copy is not much use since it will match the game itself. Players will complain about the hosting results in which case you want to be able to return to the files prior to hosting. By the way, I find it more useful in many many ways to do nice zip -9 game.zip * -x *game.zip -x z* and then attach it to a email going to an address off-system. That provides: A) backup B) dated multiple backups allowing restore to multiple points C) security in case of system crashes or hard drive failures D) ease of forwarding the latest games files to someone else in case they volunteer to pick up running the game for some reason |
Re: Linux Admining
Thanks for the answers and help! I'm still struggling with the script, but will make it work somehow. Fortunately backing up files isn't mandatory. Happiness is :)
|
Re: Linux Admining
Done! Thanks to my awesome anonymous friend and you guys my script is ready for hosting. Feel free to copy if you need such a simple script. :D
Code:
#!/bin/bash Code:
#!/bin/bash |
Re: Linux Admining
Quote:
If you look approximately halfway up the thread, I've posted a backup script that has neither of those particular issues. |
Re: Linux Admining
You are correct, the script is simple but easily altered to backup only one game.. in this case /home/dom/dominions3/backup/Rivers/
I hope that the game won't crash and use this one. :) Your script was too much for me and I didn't understand it. Thanks for your input. I will look it again when I find the time. |
Re: Linux Admining
Most of my backup script is about finding the current turn number and handling edge cases like being somehow called to backup a non-existent game (not detecting conditions like that will at best result in the script crashing and at worst data loss as it goes blindly ahead to do something stupid).
Doing Code:
--preexec /home/dom/backup.sh "$GAME" Code:
#!/bin/bash |
Re: Linux Admining
Looks like edit period ran out... It should have been
Code:
--preexec "/home/dom/backup.sh \"$GAME\"" |
Re: Linux Admining
It works perfectly! :D
|
Re: Linux Admining
Hi there, I see that people are sharing their Linux server scripts here. In case it helps: somebody contacted me about the Linux server scripts that I use for administrating my Dom3 games around June, here's what I sent back. Configuration is done by editing the GAME and PORT variables inside the scripts, and by setting the player's email addresses for email notification in the post-exec script.
Main script "MyGame.sh", this is being started in a "screen" session PHP Code:
PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 10:38 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.