Subject Triggering external routines
Author Melvin Cox
Being new to Firebird, I am searching for the most reliable means of
implementing the execution of an operating system (Linux) command from
within a Firebird 1.5 database.

I am a bit confused as to whether I should utilize a trigger, a user defined
function (UDF) or both.

An external command is to be "launched" with each insert into a particular
database table. It will contain parameters representing values being
inserted into the database table.

For example, to add a user into the passwdfile of a local web server, we
would wish to execute the following statement:

sudo htpasswd -b /usr/local/etc/apache/.htpasswd jane ladyj

Please Note: In this example, the username (jane) and password (ladyj) are
values being inserted into the database at the time the external command is
"triggered".

The statement will return an exit status (integer).

Your assistance in outlining the best way to do this is most sincerely
appreciated.


Melvin Cox