restart_nagios_with_export.sh attempts to execute su root -c "./manage_services.sh restart nagios", which fails because su(1) can't get a tty for the password prompt:
Code: Select all
cmdsubsys.log
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
standard in must be a tty
OUTPUT=RET: 0
RETURNCODE=6Code: Select all
/etc/sudoers
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *Code: Select all
restart_nagios_with_export.diff
--- restart_nagios_with_export.sh.orig 2015-04-14 22:54:00.535043805 -0400
+++ restart_nagios_with_export.sh 2015-04-14 22:54:45.324043039 -0400
@@ -41,7 +41,7 @@
if [ $ret -eq 0 ]; then
# Restart Nagios
- su root -c "./manage_services.sh restart nagios"
+ sudo ./manage_services.sh restart nagios
ret=$?
if [ $ret -gt 0 ]; then
# Remove LOCKFILE