Skip to content

Commit

Permalink
don't launch console service when in daemon mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Jun 28, 2016
1 parent b50e663 commit 33321e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ start = "main" -- main script
bootstrap = "snlua bootstrap" -- The service for bootstrap
standalone = "0.0.0.0:2013"
luaservice = root.."service/?.lua;"..root.."test/?.lua;"..root.."examples/?.lua"
lualoader = "lualib/loader.lua"
lualoader = root .. "lualib/loader.lua"
lua_path = root.."lualib/?.lua;"..root.."lualib/?/init.lua"
lua_cpath = root .. "luaclib/?.so"
-- preload = "./examples/preload.lua" -- run preload.lua before every lua service run
snax = root.."examples/?.lua;"..root.."test/?.lua"
-- snax_interface_g = "snax_g"
Expand Down
4 changes: 3 additions & 1 deletion examples/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ local max_client = 64
skynet.start(function()
skynet.error("Server start")
skynet.uniqueservice("protoloader")
local console = skynet.newservice("console")
if not skynet.getenv "daemon" then
local console = skynet.newservice("console")
end
skynet.newservice("debug_console",8000)
skynet.newservice("simpledb")
local watchdog = skynet.newservice("watchdog")
Expand Down

0 comments on commit 33321e8

Please sign in to comment.