Add service script and make timout optional for EventConsumer ctor (#1775)
* Change. Pass pid file first. Because there really no need pass timeout. Add. `fsc` script to be able shutdown MWI and Call Flow subscribe services. * Change. rename `fsc` to `service`. * Change. Use `stop` command instead of `shutdown`
This commit is contained in:
committed by
FusionPBX
parent
32ef5c7203
commit
d47151ba8d
@@ -0,0 +1,14 @@
|
||||
-- File to conrol FusionPBX Lua services/monitors
|
||||
-- @usage:
|
||||
-- # stop `call_flow_subscribe` monitor
|
||||
-- fs_cli -x "lua service flow stop"
|
||||
-- # stop `mwi_subscribe` monitor
|
||||
-- fs_cli -x "lua service mwi stop"
|
||||
|
||||
local destination = assert(argv[1], "No service name")
|
||||
local command = assert(argv[2], "No command")
|
||||
|
||||
local event = freeswitch.Event("CUSTOM", "fusion::service::" .. destination);
|
||||
event:addHeader('service-command', command)
|
||||
|
||||
event:fire()
|
||||
Reference in New Issue
Block a user