phpfcgid.sh 409 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # Adding php wrapper
  3. user="$1"
  4. domain="$2"
  5. ip="$3"
  6. home_dir="$4"
  7. docroot="$5"
  8. wrapper_script="#!/bin/sh
  9. PHPRC=/usr/local/lib
  10. export PHPRC
  11. export PHP_FCGI_MAX_REQUESTS=1000
  12. export PHP_FCGI_CHILDREN=20
  13. exec /usr/bin/php-cgi
  14. "
  15. wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
  16. echo "$wrapper_script" > $wrapper_file
  17. chown $user:$user $wrapper_file
  18. chmod -f 751 $wrapper_file
  19. exit 0