Skip to main content

Event Hooks How To?

Posted by dozment on Sat, 03/14/2009

I create a tenant configuration directory any time I add a new tenant. The tenant's directory.xml files go in this directory. I would like to use an event hook to do this (and a couple of other housekeeping things). So, I created a shell script as follows:

#!/bin/sh
TENANT=$1
mkdir /home/configs/$TENANT

...and I put the full path to the script in the Before Tenant hook field (/etc/asterisk/scripts/makeNewTenant). It doesn't seem to be running it because the directory isn't created.

Any idea what I'm doing I'm missing?

I'm running 6.0.1.70.


Submitted by cbbs70a on Sat, 03/14/2009 Permalink

I do not use the MTE software so this may not help, but I am using event hooks. It sounds to me like you want to define it in the "tenants_after_created" section, not "tenants_before_modified".

FSD

Submitted by dozment on Sat, 03/14/2009 Permalink

Well, that's actually what I did. I put it in tenants_after_created. Probem is I put it on the wrong server. That's what we sometimes call a keyboard-chair interface problem.

For anyone else who is interested the script that I posted above works (when you put it on the right server). In Thirdlane I specified thefull path to the script.

Thanks for prompting me to look at it again, cbbs.