Tokens for Execute Command Event Filter

Forum for questions and support relating to the 1.30.x releases only.
Locked
jtz
Posts: 1
Joined: Mon Jun 04, 2018 4:38 pm

Tokens for Execute Command Event Filter

Post by jtz »

Could you explain how tokens should be included as arguments to bash shell scripts used in an Event Filter?

I believe the User Guide explains that an Execute command of /usr/local/bin/zmtodrive.sh %EI% will execute as /usr/local/bin/zmtodrive.sh <id_of_the_event> <path_to_event>

A simple test script

Code: Select all

#!/bin/sh

LOGF=/var/lib/zoneminder/temp/zmtodrive.log
echo "1: >$1<" >${LOGF} 2>&1
echo "2: >$2<" >>${LOGF} 2>&1
exit 0
produces this result (with the Filter Id set equal to a known event ID = 6327 in this case)

Code: Select all

1: >%EI%<
2: >/usr/share/zoneminder/www/events/4/18/06/03/20/35/54<
Running ZoneMinder v1.30.4 installed with yum using rpmfusion on CentOS Linux release 7.4.1708 (Core)

Thank you.
Locked