pastebin

Paste Search Dynamic
Recent pastes
caching
  1. #!/bin/bash
  2.  
  3. user=$1
  4. domain=$2
  5. 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. 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
  15.     fi
  16. else
  17.     echo "$str" >> $conf
  18. fi
Parsed in 0.012 seconds