High Availability-Automatic FOP2 Start

Whenever I switch nodes around, FOP2 doesn’t automatically start. I have to do that manually: “service FOP2 start”.

Which file would I need to modify for that command to be run automatically whenever a node becomes master?

This is the second problem I’ve seen with FOP2 recently. Sigh.

There are two ways to do it. The right way, which is having it run as a FreePBX service - by creating a file in $MODULEDIR/bin called ‘freepbx_engine_hook_modulename’ (for FreePBX 12 and earlier), or, by using Startup hooks in BMO (FreePBX 13 and higher).

The ‘wrong’ way is having it part of the HA cluster startup. This is wrong because if FOP2 fails to start for some reason, it’ll break your entire cluster.

pcs resource create fop2 lsb:FOP2 op stop interval=0 timeout=60s monitor interval=60s timeout=5s start interval=0 timeout=60s pcs resource group add httpd fop2

Please, please PLEASE don’t just blindly copy and paste that. It may or may not work, but I’d hate for it to break your cluster.

More information is available here: