mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 09:03:30 +01:00
vncserver: extract IsXvncRunning()
This commit is contained in:
parent
84764bac80
commit
7954cc506c
@ -118,7 +118,7 @@ sleep(3);
|
|||||||
|
|
||||||
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
||||||
|
|
||||||
unless (kill 0, `cat $pidFile`) {
|
unless (&IsXvncRunning()) {
|
||||||
warn "Could not start Xvnc.\n\n";
|
warn "Could not start Xvnc.\n\n";
|
||||||
unlink $pidFile;
|
unlink $pidFile;
|
||||||
open(LOG, "<$desktopLog");
|
open(LOG, "<$desktopLog");
|
||||||
@ -930,7 +930,7 @@ sub StartXvncAndRecordPID {
|
|||||||
|
|
||||||
sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
||||||
if ($fontPath ne $defFontPath) {
|
if ($fontPath ne $defFontPath) {
|
||||||
unless (kill 0, `cat $pidFile`) {
|
unless (&IsXvncRunning()) {
|
||||||
if ($fpArgSpecified) {
|
if ($fpArgSpecified) {
|
||||||
warn "\nWARNING: The first attempt to start Xvnc failed, probably because the font\n";
|
warn "\nWARNING: The first attempt to start Xvnc failed, probably because the font\n";
|
||||||
warn "path you specified using the -fp argument is incorrect. Attempting to\n";
|
warn "path you specified using the -fp argument is incorrect. Attempting to\n";
|
||||||
@ -948,3 +948,7 @@ sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub IsXvncRunning {
|
||||||
|
kill 0, `cat $pidFile`;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user