Is it possible to have a bash script run when the fwconsole reload or “apply config” button is pressed?
I currently have a daily cron job that pulls user data out of the database for a phone directory and while this works, if I could have it hooked to a config reload it would be preferred.
I saw some threads about doing a custom module (which would then be called during a config reload) but that seems like a lot of overhead for what amounts to a simple mysql CSV export.
You could also just monitor files in /etc/asterisk for changes (such as extensions_additional.conf) and use that to trigger your job.
Or use a log monitoring tool like SEC to monitor the asterisk log for a reload and trigger the job.