[root@host scripts]# vim /etc/zabbix/scripts/sms.sh #! /bin/sh MAX_SMS=5 /bin/find /etc/zabbix/scripts/tmp/ -type f -mmin +60 -delete files=`ls /etc/zabbix/scripts/tmp/ | wc -l` if [ $files -lt $MAX_SMS ]; then subject=$3 curl https://someprovider.com/exec.php --data "login=XXXX&password=xxxxxx&phones=xxxxxx&rus=1&message=$subject" logger "zabbix: message has been sent - $3" else logger "SMS more than $MAX_SMS" fi echo $3 > /etc/zabbix/scripts/tmp/`date +%F_%T`