Correction & update scripts

This commit is contained in:
2023-05-15 23:16:25 +02:00
parent b8fbc07a97
commit 7f34b60582
24 changed files with 740 additions and 512 deletions

View File

@@ -2,42 +2,11 @@
install_php_package()
{
pkg_add php-8.0.26
pkg_add php-8.1.18
}
gen_php_configuration(){
cat > my_configuration/php/php-fpm.conf <<EOF
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
[global]
error_log = log/php-fpm.log
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
include=/etc/php-fpm.d/*.conf
[www]
user = www
group = www
listen = /var/www/run/php-fpm.sock
listen.owner = www
listen.group = www
listen.mode = 0660
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chroot = /var/www
env[HOSTNAME] = \$HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
EOF
cp -v default_configuration/php/php-fpm.conf my_configuration/php/php-fpm.conf
}
install_configurations_files()
@@ -53,7 +22,13 @@ start_php_service()
}
mkdir my_configuration/php/
install_php_package
gen_php_configuration
install_configurations_files
start_php_service
if [ "$1" == "gen-config-only" ];
then
gen_php_configuration
elif [ "$1" == "install" ];
then
install_php_package
gen_php_configuration
install_configurations_files
start_php_service
fi