We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bff53e commit 835343cCopy full SHA for 835343c
install/ubuntu/16.04/templates/web/nginx/caching.sh
@@ -6,7 +6,13 @@ ip=$3
6
home=$4
7
docroot=$5
8
9
-str="proxy_cache_path /var/cache/nginx/$domain levels=2"
10
-str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
11
-echo "$str" >> /etc/nginx/conf.d/01_caching_pool.conf
12
-
+str="proxy_cache_path /var/cache/nginx/$domain levels=2"
+str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
+conf='/etc/nginx/conf.d/01_caching_pool.conf'
+if [ -e "$conf" ]; then
13
+ if [ -z "$(grep "=${domain}:" $conf)" ]; then
14
+ echo "$str" >> $conf
15
+ fi
16
+else
17
18
+fi
0 commit comments