#!/bin/bash
. /etc/init.d/functions
BDIR=$(cd "$(dirname "$0")";pwd)
file=`ls $BDIR | grep zabbix | grep tar | grep gz`
res51=`grep "10051" /etc/services`
res50=`grep "10050" /etc/services`
if [ $? -eq 0 ]
then
if [ -z "$res51" ]
then
echo "d is empty"
fi
if [ $? -eq 0 ]
then
if [ -n "$res51" ]
then
echo "zabbix-trapper 10051/tcp"
fi
fi
fi
转载于:https://my.oschina.net/1143111355/blog/778359