|  | 
| 
 
 
 
 
 
 
 
 
    
    
 |  | 
 
 
	
		|  |  |  
	
	
		
	
	
	| 
			
			 
			
				January 31st, 2009, 01: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 
 
	Quote: 
	
		| 
					Originally Posted by Ornedan  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. |  Excellent scripts.  
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.
				__________________-- 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!)
 |  
	
		
	
	
	| 
			
			 
			
				January 31st, 2009, 01:07 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 
 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. 
				__________________-- 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!)
 |  
	
		
	
	
	| 
			
			 
			
				March 5th, 2009, 01:18 PM
			
			
			
		 |  
	| 
		
			|  | 
 Corporal |  | 
					Join Date: Jan 2009 Location: Espoo, Finland 
						Posts: 147
					 Thanks: 23 
		
			
				Thanked 2 Times in 2 Posts
			
		
	      |  |  
    
	| 
				 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! |  
	
		
	
	
	| 
			
			 
			
				March 5th, 2009, 02:10 PM
			
			
			
		 |  
	| 
		
			
			| 
 National Security Advisor |  | 
					Join Date: Nov 2006 Location: Oxford, UK 
						Posts: 5,921
					 Thanks: 194 
		
			
				Thanked 855 Times in 291 Posts
			
		
	      |  |  
    
	| 
				 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. |  
	
		
	
	
	| 
			
			 
			
				March 5th, 2009, 02:17 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 
 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 |  
	
		
	
	
	| 
			
			 
			
				March 5th, 2009, 02:19 PM
			
			
			
		 |  
	| 
		
			|  | 
 Corporal |  | 
					Join Date: Jan 2009 Location: Espoo, Finland 
						Posts: 147
					 Thanks: 23 
		
			
				Thanked 2 Times in 2 Posts
			
		
	      |  |  
    
	| 
				 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!
 
                 Last edited by Lihaässä; March 5th, 2009 at 02:27 PM..
 |  
	
		
	
	
	| 
			
			 
			
				September 17th, 2009, 05:38 PM
			
			
			
		 |  
	| 
		
			|  | 
 Corporal |  | 
					Join Date: Jan 2009 Location: Espoo, Finland 
						Posts: 147
					 Thanks: 23 
		
			
				Thanked 2 Times in 2 Posts
			
		
	      |  |  
    
	| 
				 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:            
#!/bin/bash
# Tällä käynnistellään dqotonen domi hostaukset
# jee
GAME="rivers"
MAP="Rivers.map"
ERA=3
MOD="CBcomplete_1.6.dm"
BUP=["rsync -a /home/dom/dominions3/savedgames/* /backup/"]
AID="57"
START=5
PORT="2222"
DOM="/home/dom/dominions3/dom3"
$DOM -S -T --port $PORT -g $GAME --era $ERA --mapfile $MAP -q --indepstr 9 --uploadmaxp $START --diffai $AID --enablemod $MOD --postexec $BUP |  
	
		
	
	
	| 
			
			 
			
				September 17th, 2009, 06:17 PM
			
			
			
		 |  
	| 
		
			|  | 
 General |  | 
					Join Date: Mar 2007 Location: Japan 
						Posts: 3,691
					 Thanks: 269 
		
			
				Thanked 397 Times in 200 Posts
			
		
	      |  |  
    
	| 
				 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"]
/bin/sh: [/bin/ls: No such file or directory 
I put my postexec commands in a script and that worked fine:
 
	Code: $DOM3EXE $DOM3GAME  \
        --port $PORT -ST${DEBUG} ${SCOREOPT} ${RENAMEOPT} \
        --era ${ERA} \
        --uploadmaxp ${PLAYERS} --noclientstart \
        --requiredvp 0 --totalvp 0  \
        --mapfile ${MAP} \
        --enablemod ${MOD} \
        -q \
        --masterpass ${MASTERPASS} \
        --preexec ${DOM3DIR}/prehost.sh --postexec ${DOM3DIR}/posthost.sh \
        >>$DOM3LOGDIR/$DOM3GAME.log 2>>$DOM3LOGDIR/$GAME.err Also, do you need -g?  The help for that shows:
 
	Code: -g  --host          Generate new turn and exit
				__________________Whether he submitted the post, or whether he did not, made no difference. The Thought Police would get him just the same. He had committed— would still have committed, even if he had never set pen to paper— the essential crime that contained all others in itself. Thoughtcrime, they called it. Thoughtcrime was not a thing that could be concealed forever.
http://z7.invisionfree.com/Dom3mods/index.php? |  
	
		
	
	
	| 
			
			 
			
				September 18th, 2009, 03:50 AM
			
			
			
		 |  
	| 
		
			|  | 
 Corporal |  | 
					Join Date: Jan 2009 Location: Espoo, Finland 
						Posts: 147
					 Thanks: 23 
		
			
				Thanked 2 Times in 2 Posts
			
		
	      |  |  
    
	| 
				 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
# Tällä käynnistellään dqotonen domi hostaukset
# jee
GAME="rivers"
MAP="Rivers.map"
ERA=3
MOD="CBcomplete_1.6.dm"
BUP={rsync -a /home/dom/dominions3/savedgames/* /backup/}
AID="0"
START=5
PORT="2222"
DOM="/home/dom/dominions3/dom3"
$DOM -S -T --port $PORT $GAME --era $ERA --mapfile $MAP \
-q --indepstr 9 --uploadmaxp $START --diffai $AID --enablemod $MOD --postexec $BUP |  
	
		
	
	
	| 
			
			 
			
				September 18th, 2009, 03:58 AM
			
			
			
		 |  
	| 
		
			|  | 
 General |  | 
					Join Date: Mar 2007 Location: Japan 
						Posts: 3,691
					 Thanks: 269 
		
			
				Thanked 397 Times in 200 Posts
			
		
	      |  |  
    
	| 
				 Re: Linux Admining 
 Did you try this?
 BUP="rsync -a /home/dom/dominions3/savedgames/* /backup/"
 
				__________________Whether he submitted the post, or whether he did not, made no difference. The Thought Police would get him just the same. He had committed— would still have committed, even if he had never set pen to paper— the essential crime that contained all others in itself. Thoughtcrime, they called it. Thoughtcrime was not a thing that could be concealed forever.
http://z7.invisionfree.com/Dom3mods/index.php? |  
	
		
	
	
	
	
	
		
	
	
	
	
	| Thread Tools |  
	|  |  
	| Display Modes |  
	
	| 
		 Linear Mode |  
	| 
	|  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 
 |  |  |  |  |