Skip to content

Commit 33321e8

Browse files
committed
don't launch console service when in daemon mode
1 parent b50e663 commit 33321e8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/config

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ start = "main" -- main script
99
bootstrap = "snlua bootstrap" -- The service for bootstrap
1010
standalone = "0.0.0.0:2013"
1111
luaservice = root.."service/?.lua;"..root.."test/?.lua;"..root.."examples/?.lua"
12-
lualoader = "lualib/loader.lua"
12+
lualoader = root .. "lualib/loader.lua"
13+
lua_path = root.."lualib/?.lua;"..root.."lualib/?/init.lua"
14+
lua_cpath = root .. "luaclib/?.so"
1315
-- preload = "./examples/preload.lua" -- run preload.lua before every lua service run
1416
snax = root.."examples/?.lua;"..root.."test/?.lua"
1517
-- snax_interface_g = "snax_g"

examples/main.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ local max_client = 64
66
skynet.start(function()
77
skynet.error("Server start")
88
skynet.uniqueservice("protoloader")
9-
local console = skynet.newservice("console")
9+
if not skynet.getenv "daemon" then
10+
local console = skynet.newservice("console")
11+
end
1012
skynet.newservice("debug_console",8000)
1113
skynet.newservice("simpledb")
1214
local watchdog = skynet.newservice("watchdog")

0 commit comments

Comments
 (0)