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.
2 parents b136829 + ae03c67 commit 2304b93Copy full SHA for 2304b93
install/deb/templates/web/nginx/caching.sh
@@ -10,10 +10,8 @@ str="proxy_cache_path /var/cache/nginx/$domain levels=1:2"
10
str="$str keys_zone=$domain:10m max_size=256m inactive=30m;"
11
conf='/etc/nginx/conf.d/01_caching_pool.conf'
12
if [ -e "$conf" ]; then
13
- if [ -z "$(grep "=${domain}:" $conf)" ]; then
14
- echo "$str" >> $conf
+ if [ -n "$(grep "=${domain}:" $conf)" ]; then
+ sed -i "/=${domain}:/d" $conf
15
fi
16
-else
17
18
19
-
+echo "$str" >> $conf
0 commit comments