Last active
February 26, 2018 01:30
-
-
Save julianarmando/38d2b105e3aee08e1b5981009ae94e89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adding php wrapper | |
user="$1" | |
domain="$2" | |
ip="$3" | |
home_dir="$4" | |
docroot="$5" | |
wrapper_script="#!/bin/sh | |
PHPRC=/usr/local/lib | |
export PHPRC | |
export PHP_FCGI_MAX_REQUESTS=1000 | |
export PHP_FCGI_CHILDREN=20 | |
exec /usr/bin/php-cgi5.6 | |
" | |
wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter" | |
echo "$wrapper_script" > $wrapper_file | |
chown $user:$user $wrapper_file | |
chmod -f 751 $wrapper_file | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment