mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-21 07:52:15 +00:00
Move scripts to app/switch/resources/scripts
This commit is contained in:
15
app/switch/resources/scripts/resources/functions/mkdir.lua
Normal file
15
app/switch/resources/scripts/resources/functions/mkdir.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
--add the mkdir function
|
||||
function mkdir(dir)
|
||||
api = freeswitch.API();
|
||||
dir = dir:gsub([[\]], "/");
|
||||
if (package.config:sub(1,1) == "/") then
|
||||
--unix
|
||||
cmd = [[mkdir -p "]] .. dir .. [["]];
|
||||
elseif (package.config:sub(1,1) == [[\]]) then
|
||||
--windows
|
||||
cmd = [[mkdir "]] .. dir .. [["]];
|
||||
end
|
||||
-- os.execute(cmd);
|
||||
api:executeString("system " .. cmd );
|
||||
return cmd;
|
||||
end
|
||||
Reference in New Issue
Block a user