mirror of https://github.com/icedream/ts3bot.git
Do not require an isolated GUI anymore.
This commit allows the TS3Bot to boot in an environment where there is no way to boot an isolated graphical environment. In that case TS3Bot will try to use the already existing display and the desktop manager that runs on it already. This adds some undefined error cases which still need to be found and fixed, so be warned: This commit is very, VERY experimental!develop
parent
ce801fecbb
commit
2e246a1a98
|
@ -10,7 +10,6 @@ pacmdPath = require_bin "pacmd"
|
|||
|
||||
module.exports = class PulseAudioService extends services.Service
|
||||
dependencies: [
|
||||
"xvfb"
|
||||
]
|
||||
constructor: -> super "PulseAudio",
|
||||
start: (cb) ->
|
||||
|
|
|
@ -16,8 +16,6 @@ ts3client_binpath = require_bin path.join(config.get("ts3-install-path"), "ts3cl
|
|||
|
||||
module.exports = class TS3ClientService extends services.Service
|
||||
dependencies: [
|
||||
"xvfb",
|
||||
"blackbox",
|
||||
"pulseaudio"
|
||||
]
|
||||
constructor: -> super "TS3Client",
|
||||
|
@ -26,6 +24,10 @@ module.exports = class TS3ClientService extends services.Service
|
|||
cb? new Error "XDG runtime directory needs to be set."
|
||||
return
|
||||
|
||||
if not process.env.DISPLAY? or process.env.DISPLAY.trim() == ""
|
||||
cb? new Error "There is no display to run TeamSpeak3 on."
|
||||
return
|
||||
|
||||
if typeof args == "function"
|
||||
cb = args
|
||||
args = null
|
||||
|
|
Loading…
Reference in New Issue