Newer
Older
icinga-plugins / update_sms_backup
Paul Staroch on 2 Feb 356 bytes added script update_sms_backup
#!/bin/bash
DIRECTORY=/var/spool/postfix/virtual/sms_backup@rueckgr.at/

COUNT=`find $DIRECTORY/ -type f -mtime -1.1|wc -l`
FILENAME=`find $DIRECTORY -mindepth 2 -type f -printf '%T@ %p\n'| sort -n | tail -1 | cut -f2- -d" "`

if [ "$COUNT" -eq 0 ]; then
	echo 2
else
	echo 0
fi

echo Last SMS backup: `stat $FILENAME|grep Modify|sed -e "s/Modify: //g"`