Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ lib64/ nagios/ plugins/ |
|
#!/bin/bash VERSION="$(grep 'VERSION_ID=' /etc/os-release | cut -d'"' -f 2)" MAJOR_VERSION="$(cut -d'.' -f 1 <<< "$VERSION")" if [[ "$MAJOR_VERSION" -lt 8 ]]; then echo "OK: Server OS version is $VERSION." exit 0 fi MYSQL_USER="ckillabuser" MYSQL_PASS="qJPaGhSJDS8D18p" MYSQL_DATABASE="ckillabuser" daemon_name="ckillabuser" daemon_debug_file='/etc/am_ckillabuser_config.cfg' daemon_pid="$(sudo /usr/bin/pgrep -x $daemon_name)" if [ -z "$daemon_pid" ]; then echo "CRITICAL: $daemon_name daemon is not running." exit 2 fi daemon_debug="$(grep 'DEBUG' $daemon_debug_file | awk '{print$3}')" if [ -z "$daemon_debug" ]; then echo "CRITICAL: Could not get $daemon_name daemon debug value from config." exit 2 elif [ "$daemon_debug" != "0" ] && [ "$daemon_debug" != "0;" ]; then echo "WARNING: $daemon_name daemon has debug set in config." exit 1 fi echo "OK: Killabusers C Daemon is running." exit 0