X7ROOT File Manager
Current Path:
/usr/local/nagios/plugins
usr
/
local
/
nagios
/
plugins
/
📁
..
📄
check-vps-cxs-log.ini
(214 B)
📄
check-vps-cxs-log.sh
(4.22 KB)
📄
check_3ware-raid.pl
(10.93 KB)
📄
check_aacraid.py
(4.62 KB)
📄
check_cl_license
(943 B)
📄
check_cplicense
(268 B)
📄
check_csf
(3.78 KB)
📄
check_eximq
(3.16 KB)
📄
check_if_ips.py
(3.88 KB)
📄
check_mdadm
(771 B)
📄
check_megaraid_sas
(6.98 KB)
📄
check_mem.pl
(12.85 KB)
📄
check_newbackup
(7.08 KB)
📄
check_puppet
(4.35 KB)
📄
check_ro_fs.sh
(530 B)
📄
check_spamd
(6.74 KB)
📁
nc-smart-data-exporter
Editing: check_ro_fs.sh
#!/bin/sh _ret() { # syntax - ret message errorcode echo $1 exit $2 } FSTAB='/etc/fstab' MP='/backup' if ! [ -f $FSTAB ]; then _ret 'no fstab' 2; fi; if ! $(awk '{print $2}' $FSTAB | grep -q "^$MP$"); then _ret "wrong fstab" 1; fi; if ! MOUNTS=$(cat /proc/mounts | grep $MP | awk '{print $4}'); then _ret "not mounted" 2; fi; #if [ $MOUNTS = "(ro.*$" ]; then _ret "/backup is mounted read-only" 2; fi; case $MOUNTS in ro,*) _ret "/backup is mounted read-only" 2 ;; *) _ret "OK" 0 ;; esac
Upload File
Create Folder