Fix ssl in update.sh
This commit is contained in:
		
							
								
								
									
										14
									
								
								update.sh
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								update.sh
									
									
									
									
									
								
							@@ -4,6 +4,12 @@ set -o pipefail
 | 
				
			|||||||
export LC_ALL=C
 | 
					export LC_ALL=C
 | 
				
			||||||
DATE=$(date +%Y-%m-%d_%H_%M_%S)
 | 
					DATE=$(date +%Y-%m-%d_%H_%M_%S)
 | 
				
			||||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
 | 
					BRANCH=$(git rev-parse --abbrev-ref HEAD)
 | 
				
			||||||
 | 
					if [[ -f mailcow.conf ]]; then
 | 
				
			||||||
 | 
						source mailcow.conf
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						echo -e "\e[31mNo mailcow.conf - is mailcow installed?\e[0m"
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Stopping mailcow
 | 
					# Stopping mailcow
 | 
				
			||||||
docker-compose down
 | 
					docker-compose down
 | 
				
			||||||
@@ -15,10 +21,6 @@ if [[ ! -z $(docker images mailcow/${image} -q) ]]; then
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Fix missing SSL, does not overwrite existing files
 | 
					 | 
				
			||||||
[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl
 | 
					 | 
				
			||||||
cp -n data/assets/ssl-example/*.pem data/assets/ssl/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Silently fixing remote url from andryyy to mailcow
 | 
					# Silently fixing remote url from andryyy to mailcow
 | 
				
			||||||
git remote set-url origin https://github.com/mailcow/mailcow-dockerized
 | 
					git remote set-url origin https://github.com/mailcow/mailcow-dockerized
 | 
				
			||||||
echo -e "\e[32mCommitting current status...\e[90m"
 | 
					echo -e "\e[32mCommitting current status...\e[90m"
 | 
				
			||||||
@@ -45,3 +47,7 @@ echo
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# TODO: Menu, select hard reset, select reset to "before update" etc.
 | 
					# TODO: Menu, select hard reset, select reset to "before update" etc.
 | 
				
			||||||
#git reset --hard origin/${BRANCH}
 | 
					#git reset --hard origin/${BRANCH}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Fix missing SSL, does not overwrite existing files
 | 
				
			||||||
 | 
					[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl
 | 
				
			||||||
 | 
					cp -n data/assets/ssl-example/*.pem data/assets/ssl/
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user