rfkill.lua 389 B

123456789101112131415161718192021
  1. local function get_info()
  2. ret.data=json.decode(util.shell("rfkill -J"))
  3. --print("--------------------",ret.data)
  4. end
  5. function run()
  6. if request and request.data then
  7. req=json.decode(request.data)
  8. if req.method == "get" then
  9. get_info()
  10. end
  11. else
  12. ret.api={
  13. info="Kablosuz Cihazların Bloke Durumu",
  14. auth=false,
  15. method={get={}},
  16. }
  17. end
  18. response=json.encode(ret)
  19. end