* Create explicit file for cron, add two automations from fixes. * Merge the OnlyOffice project into the Nextcloud project. Enhance comments and changelog. Make the container names consistent. * Found the link. :) * Add more variables. * Add a TBD file for mail server. * Create new script which will replace most the existing single purpose management scripts. * Add limit to DNS so that if Internet goes out it does not max system resources. * Prevent OnlyOffice from getting too hungry. * Ensure Reverse Proxy always has at least some resources. * Separate build. Add stats -s and combination option -A. * Make script config file aware. Add comments. * Add more comments. * Fix comments. * Further determine resource allocations. * Also avoid checking for cron's call to the program. * Add clean and log parameters. Some clean up. * Update setups to have DIR first. * Remove files taken over by manage script. * Cleaning comments and output.
		
			
				
	
	
		
			29 lines
		
	
	
		
			584 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			584 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| # 2022-08-05 Hyperling
 | |
| # Put active logs into files for analysis.
 | |
| # usage: get_logs.sh
 | |
| 
 | |
| ## Setup ##
 | |
| 
 | |
| DIR="$(dirname -- "${BASH_SOURCE[0]}")"
 | |
| PROG="$(basename -- "${BASH_SOURCE[0]}")"
 | |
| source $DIR/../source.env
 | |
| 
 | |
| dir=logs
 | |
| date_format="+%Y%m%d-%H%M%S"
 | |
| 
 | |
| ## Main ##
 | |
| 
 | |
| cd $DOCKER_HOME
 | |
| mkdir -p $dir
 | |
| docker ps | while read container_id image_name other; do
 | |
| 	image_name=${image_name##*/}
 | |
| 	echo $container_id $image_name
 | |
| 	docker inspect $container_id 1>/dev/null 2>&1 &&
 | |
| 		docker logs $container_id 1>${dir}/${image_name}.log.`date $date_format` 2>&1
 | |
| done
 | |
| 
 | |
| chmod -R 755 $dir
 | |
| 
 | |
| exit 0
 |