mirror of
				https://github.com/pcvolkmer/docker-wireguard-boringtun.git
				synced 2025-11-03 21:56:13 +00:00 
			
		
		
		
	End up with exit code 1 if running init with existing configs
This commit is contained in:
		@@ -2,9 +2,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if [ ! -f "$DEVICE.conf" ]; then
 | 
					if [ ! -f "$DEVICE.conf" ]; then
 | 
				
			||||||
  echo "No configuration: Use command 'init' to create configuration files"
 | 
					  echo "No configuration: Use command 'init' to create configuration files"
 | 
				
			||||||
else
 | 
					  exit 1
 | 
				
			||||||
  echo "Configurations - sorted by creation date"
 | 
					 | 
				
			||||||
  echo
 | 
					 | 
				
			||||||
  echo "Server"
 | 
					 | 
				
			||||||
  cat "$DEVICE.conf" | grep -e "# Client" -e "# <-" | grep -a "#" | sed "s/# //" | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/"
 | 
					 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Configurations - sorted by creation date"
 | 
				
			||||||
 | 
					echo
 | 
				
			||||||
 | 
					echo "Server"
 | 
				
			||||||
 | 
					cat "$DEVICE.conf" | grep -e "# Client" -e "# <-" | grep -a "#" | sed "s/# //" | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user