This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
halmon/panel.sh

13 lines
376 B
Bash
Raw Permalink Normal View History

2013-10-17 04:46:38 +00:00
#!/bin/sh
echo $@ > /tmp/panel.sh.log
CONFIG=/etc/asterisk/alarmreceiver.conf
DIR=$(/bin/grep eventspooldir ${CONFIG} 2>/dev/null|awk -F= '{print $2}' | sed -e 's/\ *//')
2013-12-18 04:53:30 +00:00
cd /var/www/html/halmon
2013-10-17 04:46:38 +00:00
[ -z "${DIR}" ] && echo "Cant find Alarm Dir in Config ${CONFIG}" && exit 1;
for i in $(ls -1 ${DIR}/event-* 2>/dev/null); do
2013-12-18 04:53:30 +00:00
/usr/bin/php index.php event:load --file=${i}
2013-10-17 04:46:38 +00:00
done