50 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/sh                                                                                                                                                                    
 | 
						|
#run full reclone when arguement is given                                                                                                                                        
 | 
						|
if [ $# -eq 1 ]                                                                                                                                                                  
 | 
						|
    then                                                                                                                                                                         
 | 
						|
    echo 'doing long run with all files being updated.'                                                                                                                          
 | 
						|
    #ZE server                                                                                                                                                                   
 | 
						|
    rclone copy /home/gameservers/fastdl/css_ze/materials r2demo:/css_ze/materials/                                                                                              
 | 
						|
    rclone copy /home/gameservers/fastdl/css_ze/models r2demo:/css_ze/models/                                                                                                    
 | 
						|
    rclone copy /home/gameservers/fastdl/css_ze/maps r2demo:/css_ze/maps/                                                                                                        
 | 
						|
    rclone copy /home/gameservers/fastdl/css_ze/sound r2demo:/css_ze/sound/                                                                                                      
 | 
						|
    #ZR server                                                                                                                                                                   
 | 
						|
    rclone copy /home/gameservers/fastdl/css_zr/materials r2demo:/css_zr/materials/                                                                                              
 | 
						|
    rclone copy /home/gameservers/fastdl/css_zr/models r2demo:/css_zr/models/                                                                                                    
 | 
						|
    rclone copy /home/gameservers/fastdl/css_zr/maps r2demo:/css_zr/maps/                                                                                                        
 | 
						|
    rclone copy /home/gameservers/fastdl/css_zr/sound r2demo:/css_zr/sound/                                                                                                      
 | 
						|
    #MG server                                                                                                                                                                   
 | 
						|
    rclone copy /home/gameservers/fastdl/css_mg/materials r2demo:/css_mg/materials/                                                                                              
 | 
						|
    rclone copy /home/gameservers/fastdl/css_mg/models r2demo:/css_mg/models/
 | 
						|
    rclone copy /home/gameservers/fastdl/css_mg/maps r2demo:/css_mg/maps/
 | 
						|
    rclone copy /home/gameservers/fastdl/css_mg/sound r2demo:/css_mg/sound/
 | 
						|
    #svencoop
 | 
						|
    rclone copy /home/gameservers/fastdl/svencoop/svencoop_addon r2demo:/svencoop/
 | 
						|
    #gmod zs
 | 
						|
    rclone copy --no-update-modtime /home/gameservers/fastdl/gmod_zs/maps r2demo:/gmod_zs/maps/
 | 
						|
    echo 'Finished long run with all files updated.'
 | 
						|
#else if no arguement given run default with 30minute maximum.
 | 
						|
else
 | 
						|
    echo 'doing short run with files younger than 30 minutes.'
 | 
						|
    #ZE server
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_ze/materials r2demo:/css_ze/materials/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_ze/models r2demo:/css_ze/models/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_ze/maps r2demo:/css_ze/maps/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_ze/sound r2demo:/css_ze/sound/
 | 
						|
    #ZR server
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_zr/materials r2demo:/css_zr/materials/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_zr/models r2demo:/css_zr/models/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_zr/maps r2demo:/css_zr/maps/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_zr/sound r2demo:/css_zr/sound/
 | 
						|
    #MG server
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_mg/materials r2demo:/css_mg/materials/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_mg/models r2demo:/css_mg/models/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_mg/maps r2demo:/css_mg/maps/
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/css_mg/sound r2demo:/css_mg/sound/
 | 
						|
    #svencoop
 | 
						|
    rclone copy --max-age 30m --no-traverse /home/gameservers/fastdl/svencoop/svencoop_addon r2demo:/svencoop/
 | 
						|
    #gmod zs
 | 
						|
    rclone copy --max-age 30m --no-traverse --no-update-modtime /home/gameservers/fastdl/gmod_zs/maps r2demo:/gmod_zs/maps/
 | 
						|
    echo 'Finished short run with files younger than 30 minutes.'
 | 
						|
fi
 |