Skip to content

Instantly share code, notes, and snippets.

@eapdob
Created November 22, 2022 16:52
Show Gist options
  • Save eapdob/4f818dff99ec807b0dbeb96f2ba4a619 to your computer and use it in GitHub Desktop.
Save eapdob/4f818dff99ec807b0dbeb96f2ba4a619 to your computer and use it in GitHub Desktop.
#!/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