35 lines
607 B
Bash
Executable File
35 lines
607 B
Bash
Executable File
#!/bin/sh
|
|
|
|
install_php_package()
|
|
{
|
|
pkg_add php-8.1.18
|
|
}
|
|
|
|
gen_php_configuration(){
|
|
cp -v default_configuration/php/php-fpm.conf my_configuration/php/php-fpm.conf
|
|
}
|
|
|
|
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/
|
|
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
|