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