ROOTPLOIT
Server: Apache
System: Linux node6122.myfcloud.com 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User: bashacomputer (1004)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib64/nagios/plugins/check_enhance_backup
#!/bin/bash
# check_enhance_backup
# Author: Radoslav Stoimenov <radoslav.stoimenov@worldhost.group>
# Version 0.1

# Perform the check
backup_servers_count=$(/usr/bin/sudo -u postgres /usr/bin/psql -d orchd -t -c "SELECT COUNT(*) FROM servers WHERE backup = 1;" | tr -d '[:space:]')

if [[ $backup_servers_count != "0" ]]; then
    echo "[OK] - Backup server/s for cluster configured: $backup_servers_count"
    exit 0
else
    echo "[CRITICAL] - Backup server/s not configured."
    exit 2
fi