|
@@ -50,6 +50,14 @@ if [ $log_file == "" ]; then
|
50
|
50
|
log_file="/var/log/syslog";
|
51
|
51
|
fi
|
52
|
52
|
|
|
53
|
+if [ $sites_nginx == "" ]; then
|
|
54
|
+ available_nginx="/etc/nginx/sites-available";
|
|
55
|
+fi
|
|
56
|
+
|
|
57
|
+if [ $sites_apache == "" ]; then
|
|
58
|
+ available_apache="/etc/apache2/sites-available";
|
|
59
|
+fi
|
|
60
|
+
|
53
|
61
|
if [ $sites_nginx == "" ]; then
|
54
|
62
|
sites_nginx="/etc/nginx/sites-enabled";
|
55
|
63
|
fi
|
|
@@ -145,10 +153,10 @@ fi
|
145
|
153
|
if [ "$event_key" = "0" ]; then
|
146
|
154
|
# clear tmp configs
|
147
|
155
|
if [[ "$opt" != "" ]] && [[ $opt != "nginx" ]] && [[ "$opt" == "apache" ]]; then
|
148
|
|
- rm $available_apache/*.conf
|
|
156
|
+ rm $sites_apache/*.conf
|
149
|
157
|
fi
|
150
|
158
|
if [[ "$opt" != "" ]] && [[ $opt != "apache" ]] && [[ "$opt" == "nginx" ]]; then
|
151
|
|
- rm $available_nginx/*.conf
|
|
159
|
+ rm $sites_nginx/*.conf
|
152
|
160
|
fi
|
153
|
161
|
# restore active links
|
154
|
162
|
active_sites=( $(cat $tmp_dir/active_sites.inf) );
|
|
@@ -160,7 +168,7 @@ if [ "$event_key" = "0" ]; then
|
160
|
168
|
fi
|
161
|
169
|
if [[ "$opt" != "" ]] && [[ $opt != "apache" ]] && [[ "$opt" == "nginx" ]]; then
|
162
|
170
|
if [ ! -f $sites_nginx/${active_sites[$xd]} ]; then
|
163
|
|
- ln -s $available_nginx/${active_sites[$xd]} $sites_apache/${active_sites[$xd]}
|
|
171
|
+ ln -s $available_nginx/${active_sites[$xd]} $sites_nginx/${active_sites[$xd]}
|
164
|
172
|
fi
|
165
|
173
|
fi
|
166
|
174
|
done
|