savecustom.lua
来自「嵌入式无线路由系统openwrt的web配置工具」· LUA 代码 · 共 16 行
LUA
16 行
#!/usr/bin/lua-- Copyright (C) 2008 OpenRB.comrequire('fslib')data = datajson()if (data and data.values and data.values.custom) then cfg = uci.init('firewall', 'custom', 'include', true) path = data.path and data.path or '/etc/firewall.user' uci.set('firewall', 'custom', 'path', path) uci.commit('firewall') writefile(path, "#!/bin/sh\n" .. data.values.custom)end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?