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:
Alexey Melnichuk
2016-07-26 11:58:37 -06:00
committed by FusionPBX
parent 32ef5c7203
commit d47151ba8d
4 changed files with 53 additions and 27 deletions
+14
View File
@@ -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()