try setting mail.log permissions during setup

This commit is contained in:
downtownallday
2022-09-22 18:06:03 -04:00
parent c9eb90800b
commit 35aa9f7691
2 changed files with 6 additions and 4 deletions
+1
View File
@@ -407,4 +407,5 @@ EOF
# Before miabldap v56, nsd.log was owned by nsd:nsd, which would # Before miabldap v56, nsd.log was owned by nsd:nsd, which would
# prevent rsyslog from writing to it. Fix the ownership. # prevent rsyslog from writing to it. Fix the ownership.
[ -e /var/log/nsd.log ] && chown syslog:adm /var/log/nsd.log [ -e /var/log/nsd.log ] && chown syslog:adm /var/log/nsd.log
[ -e /var/log/mail.log ] && chown syslog:adm /var/log/mail.log
restart_service rsyslog restart_service rsyslog
+5 -4
View File
@@ -366,10 +366,11 @@ flush_logs() {
else else
pid=$(/usr/bin/pidof rsyslogd) pid=$(/usr/bin/pidof rsyslogd)
fi fi
if [ "$GITHUB_ACTIONS" = "true" ]; then # if [ "$GITHUB_ACTIONS" = "true" ]; then
systemctl restart rsyslog >>$TEST_OF 2>&1 # systemctl restart rsyslog >>$TEST_OF 2>&1
sleep 5 # sleep 5
elif [ ! -z "$pid" ]; then # elif [ ! -z "$pid" ]; then
if [ ! -z "$pid" ]; then
kill -HUP $pid >>$TEST_OF 2>&1 kill -HUP $pid >>$TEST_OF 2>&1
sleep 2 sleep 2
fi fi