Set certdir after requesting
This commit is contained in:
		
							parent
							
								
									e0de7cef11
								
							
						
					
					
						commit
						b0ba4cee74
					
				| @ -22,10 +22,12 @@ for vhost in ${domains[@]}; do # for each vhost | |||||||
|             if systemctl is-active --quiet nginx |             if systemctl is-active --quiet nginx | ||||||
|             then |             then | ||||||
|                 pacman -S --noconfirm certbot-nginx |                 pacman -S --noconfirm certbot-nginx | ||||||
|                 certbot -d "$vhost" certonly --nginx --register-unsafely-without-email --agree-tos # request cert with nginx |                 certbot -d "$vhost" certonly --nginx --register-unsafely-without-email --agree-tos && | ||||||
|  |                     certdir[$index]="/etc/letsencrypt/live/$vhost" # request cert with nginx | ||||||
|             else |             else | ||||||
|                 pacman -S --noconfirm certbot |                 pacman -S --noconfirm certbot | ||||||
|                 certbot -d "$vhost" certonly --standalone --register-unsafely-without-email --agree-tos # request cert with certbot |                 certbot -d "$vhost" certonly --standalone --register-unsafely-without-email --agree-tos && | ||||||
|  |                     certdir[$index]="/etc/letsencrypt/live/$vhost" # request cert with certbot | ||||||
|             fi |             fi | ||||||
|     [ ! -d "$certdir[$index]" ] && echo "Error locating or installing SSL certificate." && exit 1 |     [ ! -d "$certdir[$index]" ] && echo "Error locating or installing SSL certificate." && exit 1 | ||||||
| done | done | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user