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 LICENSE_FILE="/usr/local/lsws/conf/license.key" LICENSE_CHECK=$(sudo du $LICENSE_FILE | awk '{print $1}') LSWS_STATUS=$(service lsws status 2>/dev/null | grep Active | awk '{print $2}') if [[ "$LICENSE_CHECK" = "0" ]] then echo "CRITICAL: License has not been validated online. Validate with /usr/local/lsws/bin/lshttpd -V" exit 2 elif [[ "$LSWS_STATUS" != "active" ]] then echo "CRITICAL: Litespeed Web Server not running. Investigate further." exit 2 else echo "OK: Litespeed Web Server running and Litespeed Web Server license file in check." exit 0 fi