Files
fusionpbx/resources/install/scripts/service
Alexey Melnichuk d47151ba8d 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`
2016-07-26 11:58:37 -06:00

15 lines
457 B
Plaintext

-- 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()