V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
lib64
/
nagios
/
plugins
/
Viewing: vz7_check_a2_template_count.sh
#!/bin/bash # SYSENG-26861 ensure the correct number of templates. Update this script when adding new templates. unmanaged has 1 less template than managed. If over min, warn/remind to update this script with new values # Get the current hostname hostname=$(hostname) # Skip if its a VZBK server if [[ $(hostname) =~ -vzbk* ]]; then exit fi # Check if 'vu' is in the hostname after 2nd hyphen for unmanaged if [[ $hostname =~ -[^-]*-.*vu ]]; then min=16 else min=18 fi count=$(/sbin/vzpkg list -Oc | wc -l) if [ "$count" -lt "$min" ]; then echo "vz7-template_count - VZ7 Template count is less than $min!" exit 2 elif [ "$count" -gt "$min" ]; then echo "vz7-template_count - VZ7 Template count exceeds $min! Update vz7-template_count.vz7 with new values." exit 1 else echo "vz7-template_count - VZ7 Template count is OK!" exit 0 fi
Coded With 💗 by
HanzOFC