Files
hestiacp/install/rpm/templates/web/httpd/phpcgi.sh

27 lines
549 B
Bash
Raw Normal View History

#!/usr/bin/bash
2024-03-19 22:05:27 +03:00
# Adding php wrapper
user="$1"
domain="$2"
ip="$3"
home_dir="$4"
docroot="$5"
php_path="$6"
2024-03-19 22:05:27 +03:00
wrapper_script="#!$php_path -cphp5-cgi.ini"
2024-03-19 22:05:27 +03:00
wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
wrapper_dir="/var/www/$user/$domain/cgi-bin"
wrapper_file2="$wrapper_dir/php"
2024-03-19 22:05:27 +03:00
echo "$wrapper_script" > $wrapper_file
chown $user:$user $wrapper_file
chmod -f 751 $wrapper_file
mkdir -p $wrapper_dir
echo "$wrapper_script" > $wrapper_file2
chown $user:$user $wrapper_file2
chown $user:$user $wrapper_dir
chmod -f 751 $wrapper_file2
2024-03-19 22:05:27 +03:00
exit 0