|
|
@@ -1,10 +1,10 @@
|
|
1
|
|
-#!/bin/bash -x
|
|
|
1
|
+#!/bin/bash
|
|
2
|
2
|
#
|
|
3
|
3
|
# author: Koshuba V.O.
|
|
4
|
4
|
# license: GPL 2.0
|
|
5
|
5
|
# create 2022
|
|
6
|
6
|
#
|
|
7
|
|
-version="0.5.7";
|
|
|
7
|
+version="0.5.10";
|
|
8
|
8
|
sname="avto4certbot";
|
|
9
|
9
|
|
|
10
|
10
|
# script path
|
|
|
@@ -103,12 +103,20 @@ fi
|
|
103
|
103
|
|
|
104
|
104
|
## create info active config sites
|
|
105
|
105
|
if [[ "$opt" != "" ]] && [[ $opt != "nginx" ]] && [[ "$opt" == "apache" ]]; then
|
|
106
|
|
- ls -F -n $sites_apache/*|awk '{print$9":"$11}' >$tmp_dir/active_sites.inf
|
|
|
106
|
+ if [ "$(find $sites_apache/* -maxdepth 0 -type l -printf '%f\n'|wc -l)" != "0" ]; then
|
|
|
107
|
+ ls -F -n $sites_apache/*|awk '{print$9":"$11}' >$tmp_dir/active_sites.inf
|
|
|
108
|
+ else
|
|
|
109
|
+ touch $tmp_dir/active_sites.inf
|
|
|
110
|
+ fi
|
|
107
|
111
|
get_tools[${#get_tools[@]}]="apache2";
|
|
108
|
112
|
web_service="$apache2_service";
|
|
109
|
113
|
fi
|
|
110
|
114
|
if [[ "$opt" != "" ]] && [[ $opt != "apache" ]] && [[ "$opt" == "nginx" ]]; then
|
|
111
|
|
- ls -F -n $sites_nginx/*|awk '{print$9":"$11}' >$tmp_dir/active_sites.inf
|
|
|
115
|
+ if [ "$(find $sites_nginx/* -maxdepth 0 -type l -printf '%f\n'|wc -l)" != "0" ]; then
|
|
|
116
|
+ ls -F -n $sites_nginx/*|awk '{print$9":"$11}' >$tmp_dir/active_sites.inf
|
|
|
117
|
+ else
|
|
|
118
|
+ touch $tmp_dir/active_sites.inf
|
|
|
119
|
+ fi
|
|
112
|
120
|
get_tools[${#get_tools[@]}]="nginx";
|
|
113
|
121
|
web_service="nginx";
|
|
114
|
122
|
fi
|