Created
November 22, 2022 16:52
-
-
Save eapdob/4f818dff99ec807b0dbeb96f2ba4a619 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=500 | |
export PHP_FCGI_CHILDREN=10 | |
exec /usr/bin/php81-cgi | |
" | |
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