Start by restarting rsyslog service

This commit is contained in:
Jeremy Gardais 2019-10-10 11:46:53 +02:00
parent fedd213ff4
commit 7a0506fc50
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ fi
# Check if a file exceeds it's modification time {{{
if echo "${BBALPHAMSG}" | grep -qE "File was modified.*ago - should be.*" ; then
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Test file — Some files exceeds their modification time." >> "${debug_stdout}"
# First restart Rsyslog service {{{
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Test service — First restart rsyslog service." >> "${debug_stdout}"
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Test service — ssh -n -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${REMOTE_SSH_USER}@${BBHOSTNAME} sudo systemctl restart rsyslog.service" >> "${debug_stdout}"
#ssh -n -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "${REMOTE_SSH_USER}"@"${BBHOSTNAME}" "sudo systemctl restart rsyslog.service" >> "${debug_stdout}" 2>> "${debug_stderr}"
# }}}
## Get the list of files path
## TODO: Set a pattern for both yellow and red colors
echo "${BBALPHAMSG}" | sed -n 's;^\&yellow <a.*>\(.*\)</a>;\1;p' > "${file_list}"