999-delete-altitude 327 B

1234567891011
  1. #!/usr/bin/lua
  2. local uci = require('luci.model.uci').cursor()
  3. local sname = uci:get_first("gluon-node-info", "location")
  4. local altitude = uci:get("gluon-node-info", sname, "altitude")
  5. if altitude ~= nil then
  6. uci:delete("gluon-node-info", sname, "altitude")
  7. uci:save("gluon-node-info")
  8. uci:commit("gluon-node-info")
  9. end