conf_server/install_php.sh

35 lines
607 B
Bash
Raw Permalink Normal View History

2023-01-11 01:03:34 +01:00
#!/bin/sh
install_php_package()
{
2023-05-15 23:16:25 +02:00
pkg_add php-8.1.18
2023-01-11 01:03:34 +01:00
}
gen_php_configuration(){
2023-05-15 23:16:25 +02:00
cp -v default_configuration/php/php-fpm.conf my_configuration/php/php-fpm.conf
2023-01-11 01:03:34 +01:00
}
install_configurations_files()
{
cp -v /etc/php-fpm.conf /etc/php-fpm.conf.old
cp -v my_configuration/php/php-fpm.conf /etc/php-fpm.conf
}
start_php_service()
{
rcctl start php80_fpm
}
mkdir my_configuration/php/
2023-05-15 23:16:25 +02:00
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