From 198231fb458310f5f5f2a917818fd8c80132faa3 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 12 Jul 2017 18:55:21 +0200 Subject: [PATCH] Replace logrotate conf with templates --- createlinks | 3 ++- .../templates/etc/logrotate.d/php-fpm/php-fpm | 12 ++++++++++++ root/etc/logrotate.d/smeserver-php-fpm | 12 ------------ 3 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm delete mode 100644 root/etc/logrotate.d/smeserver-php-fpm diff --git a/createlinks b/createlinks index adf9e4e..c6cda63 100644 --- a/createlinks +++ b/createlinks @@ -33,7 +33,8 @@ safe_symlink('/etc/e-smith/templates-default/template-begin-shell', 'root/etc/e- 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/opt/remi/php71/sysconfig/php-fpm + /etc/logrotate.d/php-fpm ){ templates2events($file, qw(webapps-update bootstrap-console-save)); } diff --git a/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm b/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm new file mode 100644 index 0000000..97a6029 --- /dev/null +++ b/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm @@ -0,0 +1,12 @@ +/var/log/php/*/*.log \{ + missingok + notifempty + sharedscripts + delaycompress + postrotate + /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true + /sbin/e-smith/service php56-php-fpm reload >/dev/null 2>&1 || true + /sbin/e-smith/service php70-php-fpm reload >/dev/null 2>&1 || true + /sbin/e-smith/service php71-php-fpm reload >/dev/null 2>&1 || true + endscript +\} diff --git a/root/etc/logrotate.d/smeserver-php-fpm b/root/etc/logrotate.d/smeserver-php-fpm deleted file mode 100644 index 8e87c41..0000000 --- a/root/etc/logrotate.d/smeserver-php-fpm +++ /dev/null @@ -1,12 +0,0 @@ -/var/log/php/*/*.log { - missingok - notifempty - sharedscripts - delaycompress - postrotate - /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true - /sbin/e-smith/service php56-php-fpm reload >/dev/null 2>&1 || true - /sbin/e-smith/service php70-php-fpm reload >/dev/null 2>&1 || true - /sbin/e-smith/service php71-php-fpm reload >/dev/null 2>&1 || true - endscript -}