mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 00:53:39 +01:00
vncserver: extract IsXvncRunning()
This commit is contained in:
parent
84764bac80
commit
7954cc506c
@ -118,7 +118,7 @@ sleep(3);
|
||||
|
||||
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
||||
|
||||
unless (kill 0, `cat $pidFile`) {
|
||||
unless (&IsXvncRunning()) {
|
||||
warn "Could not start Xvnc.\n\n";
|
||||
unlink $pidFile;
|
||||
open(LOG, "<$desktopLog");
|
||||
@ -930,7 +930,7 @@ sub StartXvncAndRecordPID {
|
||||
|
||||
sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
||||
if ($fontPath ne $defFontPath) {
|
||||
unless (kill 0, `cat $pidFile`) {
|
||||
unless (&IsXvncRunning()) {
|
||||
if ($fpArgSpecified) {
|
||||
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";
|
||||
@ -948,3 +948,7 @@ sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub IsXvncRunning {
|
||||
kill 0, `cat $pidFile`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user