Skip to content
Snippets Groups Projects
Select Git revision
  • 3eb603d0d810b9298f5624aaa8a293c4b51e4b2a
  • master default protected
  • hpke
  • ppc-chacha-4core
  • delete-internal-name-mangling
  • master-updates
  • ppc-gcm
  • ppc-chacha-2core
  • refactor-ecc-mod
  • ppc-chacha-core
  • use-mpn_cnd-functions
  • optimize-ecc-invert
  • default-m4-quote-char
  • power-asm-wip
  • test-fat
  • chacha-3core-neon
  • x86_64-salsa20-2core
  • salsa20-2core-neon
  • bcrypt
  • arm-salsa20-chacha-vsra
  • test-shlib-dir
  • nettle_3.6_release_20200429
  • nettle_3.6rc3
  • nettle_3.6rc2
  • nettle_3.6rc1
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
  • nettle_3.5rc1
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
41 results

aes-decrypt-internal.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    check_enodia_monitored 1.17 KiB
    #!/bin/sh
    
    # Check that all hosts in /opt/enodia/export/active_ips.txt are
    # monitored by Nagios.  More accurately, for each line in
    # active_ips.txt, check that /usr/local/nagios/var/checked_ips/$ip
    # exists and is at most 24 hours old.  That file is created by the
    # check_ping script.
    
    CHECKED=/usr/local/nagios/var/checked_ips
    UNCHECKED=`tempfile`
    unmonitored=""
    
    find "$CHECKED" -mtime +0 -type f -exec rm {} \;
    while read ip host
    do
        if [ ! -f $CHECKED/$ip ]
        then
    	echo "$ip ($host)" >> "$UNCHECKED"
        fi
    done < /opt/enodia/export/active_ips.txt
    
    unchecked=`wc -l < "$UNCHECKED"`
    chmod 644 "$UNCHECKED"
    if [ $unchecked = 0 ]
    then
        echo "OK - all checked | unchecked=0"
        mv -f "$UNCHECKED" /usr/local/nagios/var/unchecked
        exit 0
    else
        echo -n "CRITICAL - $unchecked unchecked hosts: "
        sed 's/\.lysator\.liu\.se)$/)/' "$UNCHECKED" \
        | awk 'BEGIN { sz = 0 }
                 NR > 1 && sz < 198 { printf ", "; sz += 2 } 
                 sz < 200 { printf "%s", $0; sz += length($0) }
    	     END { if (sz >= 200) printf ", others" } ' \
        | sed 's/, \([^,]*\)$/ and \1/'
        echo ". | unchecked=$unchecked"
        mv -f "$UNCHECKED" /usr/local/nagios/var/unchecked
        exit 2
    fi