123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/usr/bin/slua
- package.path = "/usr/milis/ayguci/kod/?.lua" .. ";".. package.path
- l5=require("l5")
- json=require("json")
- serpent=require("serpent")
- util=require("util")
- string.split=util.string.split
- stat=function(file) return l5.lstat3(file) end
- request={}
- ret={}
- local modules_dir="/usr/milis/ayguci/modules/"
- local delim="%^"
- local argument=arg[1]
- if request then
- local modul=argument:split(delim)[1]
- local param=argument:split(delim)[2]
- if modul then
- local mdizin=modul:split("/")[1]
- local mfun=modul:split("/")[2]
- if stat(modules_dir..modul..".lua") then
- package.path = modules_dir.. mdizin.."/?.lua" .. ";".. package.path
- local md=require(mfun)
- request.data=param
- run()
- print(response)
- else
- print("modul yok",modul)
- end
- end
- end
|