From aab04f301970cf9862dbbf5f0c19497297aab3f6 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 22 Oct 2014 08:09:10 +0000 Subject: [PATCH] Update the Voicemail MWI LUA script to use the new scripts/resources/run directory. --- .../scripts/app/voicemail/resources/scripts/mwi.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/install/scripts/app/voicemail/resources/scripts/mwi.lua b/resources/install/scripts/app/voicemail/resources/scripts/mwi.lua index 627726d35a..be241cc5d8 100644 --- a/resources/install/scripts/app/voicemail/resources/scripts/mwi.lua +++ b/resources/install/scripts/app/voicemail/resources/scripts/mwi.lua @@ -29,9 +29,11 @@ dofile(config()); --define general settings - tmp_file = "/usr/local/freeswitch/log/mwi.tmp"; sleep = 300; +--define the run file + run_file = scripts_dir .. "/resources/run/voicemail-mwi.tmp"; + --debug debug["sql"] = false; debug["info"] = false; @@ -43,7 +45,7 @@ dbh = database_handle('system'); --used to stop the lua service - local file = assert(io.open(tmp_file, "w")); + local file = assert(io.open(run_file, "w")); file:write("remove this file to stop the script"); --add the trim function @@ -64,8 +66,8 @@ while true do --exit the loop when the file does not exist - if (not file_exists(tmp_file)) then - freeswitch.consoleLog("NOTICE", tmp_file.." not found\n"); + if (not file_exists(run_file)) then + freeswitch.consoleLog("NOTICE", run_file.." not found\n"); break; end