vhost fixe
This commit is contained in:
		
							
								
								
									
										16
									
								
								bin/vhost.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								bin/vhost.sh
									
									
									
									
									
								
							| @@ -60,10 +60,10 @@ if [ "$vh" = "y" ]; then | |||||||
|   # https://certbot.eff.org/lets-encrypt/debianstretch-nginx |   # https://certbot.eff.org/lets-encrypt/debianstretch-nginx | ||||||
|   if [ "$_letsencrypt" = "yes" ]; then |   if [ "$_letsencrypt" = "yes" ]; then | ||||||
|     apt-get --yes --force-yes install certbot |     apt-get --yes --force-yes install certbot | ||||||
|     certbot certonly --cert-name "$_domain" --standalone –d "$_domain" |     certbot certonly --standalone -d "$_domain" --cert-name "$_domain" | ||||||
|     openssl dhparam –out /etc/nginx/dhparam.pem 2048 |     openssl dhparam -out /etc/nginx/dhparam.pem 2048 | ||||||
|     # TODO renewing |     # renewing | ||||||
|     touch /var/spool/crontab/root |     touch /var/spool/cron/crontabs/root | ||||||
|     crontab -l > mycron |     crontab -l > mycron | ||||||
|     echo -e "0 3 * * * certbot renew --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' --cert-name $_domain" >> mycron |     echo -e "0 3 * * * certbot renew --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' --cert-name $_domain" >> mycron | ||||||
|     crontab mycron |     crontab mycron | ||||||
| @@ -72,15 +72,15 @@ if [ "$vh" = "y" ]; then | |||||||
|  |  | ||||||
|   if [ "$_drupal" = "yes" ]; then |   if [ "$_drupal" = "yes" ]; then | ||||||
|     if [ "$_letsencrypt" = "yes" ]; then |     if [ "$_letsencrypt" = "yes" ]; then | ||||||
|       _conffile = "drupal-ssl.nginxconf" |       _conffile="drupal-ssl.nginxconf" | ||||||
|     else |     else | ||||||
|       _conffile = "drupal.nginxconf" |       _conffile="drupal.nginxconf" | ||||||
|     fi |     fi | ||||||
|   else |   else | ||||||
|     if [ "$_letsencrypt" = "yes" ]; then |     if [ "$_letsencrypt" = "yes" ]; then | ||||||
|       _conffile = "simple-phpfpm-ssl.nginxconf" |       _conffile="simple-phpfpm-ssl.nginxconf" | ||||||
|     else |     else | ||||||
|       _conffile = "simple-phpfpm.nginxconf" |       _conffile="simple-phpfpm.nginxconf" | ||||||
|     fi |     fi | ||||||
|   fi |   fi | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Bachir Soussi Chiadmi
					Bachir Soussi Chiadmi