PHP FPM integration on SME Server. Let you run several versions of PHP (using SCL from Remi's repo) at the same time
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.3 KiB

8 years ago
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
foreach my $service (qw(php-fpm php56-php-fpm php70-php-fpm php71-php-fpm)){
service_link_enhanced($service, "S86", "7");
service_link_enhanced($service, "K16", "6");
service_link_enhanced($service, "K16", "0");
service_link_enhanced($service, "K16", "1");
foreach my $event qw(webapps-update share-create share-modify share-modify-server share-delete){
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/$service");
}
}
foreach my $file qw( /etc/php-fpm.conf
/etc/php-fpm.d/www.conf
/etc/php-fpm.d/shares.conf
/etc/php-fpm.d/custom.conf
/opt/remi/php56/root/etc/php-fpm.conf
/opt/remi/php56/root/etc/php-fpm.d/www.conf
/opt/remi/php56/root/etc/php-fpm.d/shares.conf
/opt/remi/php56/root/etc/php-fpm.d/custom.conf
/etc/opt/remi/php70/php-fpm.conf
/etc/opt/remi/php70/php-fpm.d/www.conf
/etc/opt/remi/php70/php-fpm.d/shares.conf
/etc/opt/remi/php70/php-fpm.d/custom.conf
/etc/opt/remi/php71/php-fpm.conf
/etc/opt/remi/php71/php-fpm.d/www.conf
/etc/opt/remi/php71/php-fpm.d/shares.conf
/etc/opt/remi/php71/php-fpm.d/custom.conf ){
templates2events($file, qw(webapps-update bootstrap-console-save share-create share-modify share-modify-server share-delete));
safe_symlink('/etc/e-smith/templates-default/template-begin-ini', "root/etc/e-smith/templates$file/template-begin");
}
safe_symlink('/etc/e-smith/templates-default/template-begin-shell', 'root/etc/e-smith/templates/etc/cron.daily/tmpwatch-php-fpm/template-begin');
foreach my $file qw( /etc/sysconfig/php-fpm
/opt/remi/php56/root/etc/sysconfig/php-fpm
/etc/opt/remi/php70/sysconfig/php-fpm
/etc/opt/remi/php71/sysconfig/php-fpm
/etc/logrotate.d/php-fpm ){
templates2events($file, qw(webapps-update bootstrap-console-save));
}
event_link("php-pool-dirs", "share-create", "90");
event_link("php-pool-dirs", "share-modify", "90");
event_link("php-pool-dirs", "share-modify-server", "90");
event_link("php-pool-dirs", "share-delete", "90");