OC-misc/bbs/OpenOS/etc/rc.d/bbsd.lua

18 lines
341 B
Lua
Raw Normal View History

2023-11-14 20:46:42 +11:00
local bboard = require "bboard"
local rpc = require "rpc"
function start()
for k,v in pairs(bboard) do
if type(v) == "function" then
rpc.register("bbs_"..k, v)
end
end
end
function stop()
if not rpc.unregister then return false end
for k,v in pairs(bboard) do
rpc.unregister("bbs_"..k)
end
end
return {start=start, stop=stop}