mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 00:53:39 +01:00
vncserver: extract WarnUserXvncNotStartedAndExit()
This commit is contained in:
parent
7954cc506c
commit
df5d3e506d
@ -119,12 +119,7 @@ sleep(3);
|
||||
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
||||
|
||||
unless (&IsXvncRunning()) {
|
||||
warn "Could not start Xvnc.\n\n";
|
||||
unlink $pidFile;
|
||||
open(LOG, "<$desktopLog");
|
||||
while (<LOG>) { print; }
|
||||
close(LOG);
|
||||
die "\n";
|
||||
&WarnUserXvncNotStartedAndExit();
|
||||
}
|
||||
|
||||
warn "\nNew '$desktopName' desktop is $host:$displayNumber\n";
|
||||
@ -952,3 +947,12 @@ sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
||||
sub IsXvncRunning {
|
||||
kill 0, `cat $pidFile`;
|
||||
}
|
||||
|
||||
sub WarnUserXvncNotStartedAndExit {
|
||||
warn "Could not start Xvnc.\n\n";
|
||||
unlink $pidFile;
|
||||
open(LOG, "<$desktopLog");
|
||||
while (<LOG>) { print; }
|
||||
close(LOG);
|
||||
die "\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user