Skip to content
Permalink
Browse files

Update API socket

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 25, 2019
1 parent 27cbf43 commit 7eff3509c6ec9487dee4c010d43201b1c74aee99
Showing with 3 additions and 1 deletion.
  1. +3 −1 services.sh
@@ -20,13 +20,15 @@ ver=$(/usr/local/bin/nems-info nemsver)

# All Platforms

socket=$(/usr/local/bin/nems-info socket)

# nagios-api
if grep -q "service.nagios-api=0" "$conf"; then
sleep 1
else
sleep 15 # Need to wait a bit so Nagios has time to load first
if (( $(awk 'BEGIN {print ("'$ver'" >= "'1.4'")}') )); then
/root/nems/nagios-api/nagios-api -p 8090 -c /var/lib/nagios3/rw/live.sock -s /var/cache/nagios/status.dat -l /var/log/nagios/nagios.log >> /var/log/nagios-api.log 2>&1 &
/root/nems/nagios-api/nagios-api -p 8090 -c $socket -s /var/cache/nagios/status.dat -l /var/log/nagios/nagios.log >> /var/log/nagios-api.log 2>&1 &
else
/root/nems/nagios-api/nagios-api -p 8090 -c /var/lib/nagios3/rw/live.sock -s /var/cache/nagios3/status.dat -l /var/log/nagios3/nagios.log >> /var/log/nagios-api.log 2>&1 &
fi

0 comments on commit 7eff350

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