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: check_a2_redis_opcache.shared
#!/bin/bash # Ref: BFENG-1101 # To verify that redis and opcache extensions are available in the specified php versions. # Exit if isn't cPanel if [ ! -s "/usr/local/cpanel/version" ]; then exit fi _php_versions_list=("5.2" "5.3" "5.4" "5.5" "5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3") _php_missing_opcache="" _php_missing_redis="" for _php_version in "${_php_versions_list[@]}" do _php_extensions=$(selectorctl --interpreter=php --list-extensions --version=$_php_version | grep -wE 'opcache|redis') if [[ $_php_extensions != *"+ opcache"* ]]; then _php_missing_opcache+="$_php_version, " fi if [[ $_php_extensions != *"+ redis"* ]]; then _php_missing_redis+="$_php_version, " fi done if [[ -z $_php_missing_opcache && -z $_php_missing_redis ]]; then echo "check_redis_opcache - All PHP versions have opcache and redis extensions enabled." exit 0 else if [[ -n $_php_missing_opcache && -n $_php_missing_redis ]]; then echo "check_redis_opcache - PHP ${_php_missing_opcache%, } missing opcache extension and PHP ${_php_missing_redis%, } missing redis extension." exit 2 elif [[ -n $_php_missing_opcache ]]; then echo "check_redis_opcache - PHP ${_php_missing_opcache%, } missing opcache extension." exit 2 elif [[ -n $_php_missing_redis ]]; then echo "check_redis_opcache - PHP ${_php_missing_redis%, } missing redis extension." exit 2 fi fi
Coded With 💗 by
HanzOFC