$ cat shh.sh
#!/bin/sh
now=`date +%s`
commandfile=’/var/lib/nagios3/rw/nagios.cmd’
echo "[%lu] DISABLE_NOTIFICATIONS\n" $now > $commandfile
now=`date +%s`
commandfile=’/var/lib/nagios3/rw/nagios.cmd’
echo "[%lu] DISABLE_NOTIFICATIONS\n" $now > $commandfile
Enabling notifications across the board is similar:
$ cat enable-notifications.sh
#!/bin/sh
now=`date +%s`
commandfile=’/var/lib/nagios3/rw/nagios.cmd’
echo "[%lu] ENABLE_NOTIFICATIONS\n" $now > $commandfile
now=`date +%s`
commandfile=’/var/lib/nagios3/rw/nagios.cmd’
echo "[%lu] ENABLE_NOTIFICATIONS\n" $now > $commandfile
Leave a Reply