Named Triggers

Named triggers have been introduced to allow triggers to be inserted and removed into/from the running system.

Triggerlist

Before we can insert triggers into the running system and delete them again we need a possibility to display the currently installed triggers. I decided to go the hard way since it is much more versatile.
When requesting the URL "/def/eibdef.xml", rleibd returns a XML-file of the following structure:

<eib>
    ...
    <grp adr="1.2.3">
        <trigger name="abc" cmd="command">
        </trigger>
        ...
    </grp>
    ...
</eib>
This is hardly suited for a direct display (like a simple textblock or a html-table) but you can format, filter or sort it at will, for example with an Ajaxscript. A sample script is located in the "examples"-folder in the package (triggerlist.html).
Using this script requires the following line in your apache config:
ProxyPass /rleibd http://localhost:1215
This is because most browsers refuse to accept data from a different domain, with a different protocol or even from a different port than the calling page. With this line we create a virtual directory in the realm of the calling page wich is redirected to rleibd by apache internally.
Security advice: with this entry, rleibd is also reachable from your port 80 (not only from port 1215)!
If it is not, you propably forgot to enable mod_proxy ("a2enmod proxy" and "a2enmod proxy_http").

Inserting Triggers

To insert a trigger, send a request like

/trigger/ins/?name=myname&grp=1.2.3&cmd=path-to-myprogram%20%25v
Be sure to escape the %-sign as %25 else it cannot be transferred correctly.

The name of the trigger is optional but if you want to delete it later you must specify it and it must be unique.
The name must only contain standard Ascii-characters (no umlauts or language specific characters). This is a design limit and will not change in the near future.

Removing Triggers

To delete a trigger send a request like

/trigger/del/?name=myname
(Now it is obvious why the name has to be unique)
Possibly running programs are not to be terminated but no new ones will be executed.

Triggers inserted this way will not survive a restart of rleibd.

Of course, you can also specify a name in your eibdef.xml. They behave vice versa, i.e. you can delete them from the running system but after a restart of rleibd, they will be active again.