--- rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11950-symlinked-logs.patch 2022/04/17 03:56:39 1.2 +++ rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11950-symlinked-logs.patch 2022/09/09 05:53:40 1.6 @@ -45,8 +45,8 @@ diff -Nur --no-dereference e-smith-base- safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog"); diff -Nur --no-dereference e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/logrotate-migrate e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate --- e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/logrotate-migrate 1969-12-31 19:00:00.000000000 -0500 -+++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:54:07.894000000 -0400 -@@ -0,0 +1,50 @@ ++++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/logrotate-migrate 2022-04-16 23:59:07.124000000 -0400 +@@ -0,0 +1,52 @@ +#!/bin/bash +# this script is to migrate old symlink log to regular file in order +# to be handled by logrotate @@ -67,6 +67,7 @@ diff -Nur --no-dereference e-smith-base- +/var/log/httpd/bkpc_access_log +/var/log/httpd/bkpc_error_log +/var/log/httpd/issoqlog_access_log ++/var/log/httpd/isoqlog_access_log +/var/log/httpd/isoqlog_error_log +/var/log/httpd/pki_access_log +/var/log/httpd/pki_error_log @@ -87,13 +88,14 @@ diff -Nur --no-dereference e-smith-base- + if [ -f "$mylink" ]; then + cp --attributes-only "$mylink" "$f" + fi -+ found ++ ++ ((found+=1)) + fi +done + +# restart the needed services -+if [ $found > 0 ] ; then -+ /usr/bin/systemctl restart httpd-*.service > /dev/null 2>/dev/null ++if [ $found -gt 0 ] ; then ++ /usr/bin/systemctl daemon-reload > /dev/null 2>/dev/null ++ /usr/bin/systemctl reload httpd-*.service > /dev/null 2>/dev/null + /usr/bin/systemctl restart rsyslog.service > /dev/null 2>/dev/null +fi +