helper-scripts/sms/huawei_sms.zabbix_alert_script

12 lines
279 B
Plaintext
Raw Normal View History

#!/bin/bash
ROUTERIP=`echo ${1} | awk '{ print $1 }'`
USER=`echo ${1} | awk '{ print $2 }'`
PASS=`echo ${1} | awk '{ print $3 }'`
NUMBER=`echo ${1} | awk '{ print $4 }'`
body=${2}
cat <<EOF | /usr/bin/huawei_sms -i ${ROUTERIP} -u ${USER} -p ${PASS} -n ${NUMBER} -
${body}
EOF