Moving the scripts to a common directory not only vastly simplifies the zzz-gluon-upgrade script, but also allows to define an ordering of such scripts across packages.
14 lines
279 B
Lua
Executable File
14 lines
279 B
Lua
Executable File
#!/usr/bin/lua
|
|
|
|
local uci = require 'luci.model.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")
|
|
c:commit("fastd")
|
|
end
|