6cf03bab37
We also make use of the boolean support of simple-uci to make scripts clearer.
13 lines
255 B
Lua
Executable File
13 lines
255 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local uci = require 'simple-uci'
|
|
|
|
local c = uci.cursor()
|
|
|
|
local secret = c:get("fastd", "mesh_vpn", "secret")
|
|
|
|
if not secret or not secret:match(("%x"):rep(64)) then
|
|
c:set("fastd", "mesh_vpn", "secret", "generate")
|
|
c:save("fastd")
|
|
end
|