Hi all, I am hoping someone has experience with Advanced Recovery Switchover Hook Scripts. The documentation seems to be lacking or inaccurate.
I’ve configured the script to /opt/FreePBX-advr-script/advr-hook.sh, synced the configuration to the secondary server and verified that the asterisk user has permissions to run it on both servers. All it is doing currently is writing out the arguments passed to the script. The only time it seems to run is when the primary server becomes active the script runs on the primary server. When it runs there are no arguments (the documentation states “Execute post switchover hooks to run custom third party script with an “START” argument.”) The adv_recovery.log and adv_recovery_hook.log files only mention the hook script when I save the configuration, but not when switching servers.
I am unsure if I should keep barking up this tree, or to just write my own script that constantly checks which server is active and does what I need it to do when it detects a change. Is there a way from the command line to get the current status of advanced recovery (ie. active or standby)?
Any help would be appreciated.