#!/bin/bash set -e usage="$0 " if [ $# -ne 1 ] then echo $usage exit 1 fi time=$(date +%F) # files file=/usr/share/php/SysAl/AlarmInterface/RemoteInterface/request.tpl request_file=request.xml config_file=/usr/share/php/SysAl/AlarmInterface/RemoteInterface/CallPhp.config ls $file 1>/dev/null grep -v ServiceInfluence $file |sed "s/_AMOI_/$(hostname)/" |sed "s/_TIME_/$time/" |sed "s/_ALARM_/$1/" > request.xml /usr/share/php/SysAl/util/CallPhp.php $request_file $config_file