Skip to content
Permalink
Browse files

Error handling if nems-mailtest run as non-root

  • Loading branch information...
NEMS Linux
NEMS Linux committed Apr 12, 2019
1 parent 2866e8f commit 11956a343800153ee230bda674594043d81799e5
Showing with 7 additions and 0 deletions.
  1. +7 −0 fixes.sh
@@ -413,6 +413,13 @@ if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.5'")}') )); then
echo "PATCH-000006" >> /var/log/nems/patches.log
fi

# Add some error handling if nems-mailtest was run as a non-root user
if ! grep -q "if (!file_put_contents('/var/log/nagios/nagios.log'" /usr/local/nagios/libexec/nems_sendmail_service; then
cp -f /root/nems/nems-migrator/data/1.5/nagios/plugins/nems_sendmail_service /usr/local/nagios/libexec/
fi
if ! grep -q "if (!file_put_contents('/var/log/nagios/nagios.log'" /usr/local/nagios/libexec/nems_sendmail_host; then
cp -f /root/nems/nems-migrator/data/1.5/nagios/plugins/nems_sendmail_host /usr/local/nagios/libexec/
fi

fi

0 comments on commit 11956a3

Please sign in to comment.
You can’t perform that action at this time.