Browse Source

continue develop 23.01.25:20.59

root 2 months ago
parent
commit
967588941b
2 changed files with 5 additions and 10 deletions
  1. 0 2
      dev/avto4certbot.conf
  2. 5 8
      dev/avto4certbot.sh

+ 0 - 2
dev/avto4certbot.conf

@@ -17,8 +17,6 @@ sites_nginx="/etc/nginx/sites-enabled";
17 17
 available_apache="/etc/apache2/sites-available";
18 18
 sites_apache="/etc/apache2/sites-enabled";
19 19
 
20
-## - apache2 mode (worker or prefork)
21
-apache2_mode="prefork";
22 20
 ## - apache2 start service default (apache2) or mode multi-instance (apache2@cert)
23 21
 apache2_service="apache2";
24 22
 

+ 5 - 8
dev/avto4certbot.sh

@@ -69,10 +69,7 @@ if [ $sites_apache == "" ]; then
69 69
   fi
70 70
 fi
71 71
 
72
-if [ $apache2_mode == "" ]; then
73
-  apache2_mode="prefork";
74
-fi
75
-
72
+## apache2 mode: prefork or worker (multi-instance)
76 73
 if [ $apache2_service == "" ]; then
77 74
   apache2_service="apache2";
78 75
 fi
@@ -105,7 +102,7 @@ fi
105 102
 if [[ "$opt" != "" ]] && [[ $opt != "nginx" ]] && [[ "$opt" == "apache" ]]; then
106 103
   find $sites_apache/* -maxdepth 0 -type l -printf '%f\n' >$tmp_dir/active_sites.inf 2>/dev/null;
107 104
   get_tools[${#get_tools[@]}]="apache2";
108
-  service="apache2";
105
+  service="$apache2_service";
109 106
 fi
110 107
 if [[ "$opt" != "" ]] && [[ $opt != "apache" ]] && [[ "$opt" == "nginx" ]]; then
111 108
   find $sites_nginx/* -maxdepth 0 -type l -printf '%f\n' >$tmp_dir/active_sites.inf 2>/dev/null;
@@ -199,10 +196,10 @@ for ((xd=0; xd != ${#domains[@]}; xd++)); do
199 196
   local site_data=( $(echo -e ${domains[$xd]}|sed 's/ /\n /g') );
200 197
   site_name="${site_data[0]}";
201 198
   site_owner="${site_data[1]}";
202
-  certbot register -m "$site_owner" -d $site_name
203
-  sleep 2;
199
+  #certbot register -m "$site_owner" -d $site_name
200
+  #sleep 2;
204 201
   certbot -m "$site_owner" certonly --webroot --webroot-path $web_dir -d $site_name
205
-  sleep 3;
202
+  sleep 2;
206 203
 done
207 204
 }
208 205