vncserver: extract PrepareLoggingAndXvncKillingFramework()

This commit is contained in:
Dmitry Maksyoma 2021-08-13 18:49:01 +12:00
parent 3f23bddb6b
commit 3522000d1f

View File

@ -34,7 +34,7 @@ use Time::HiRes qw (sleep);
&ParseAndProcessCliOptions();
&CreateDotVncDir();
&PrepareLoggingAndXvncKillingFramework();
&DisableLegacyVncAuth();
&SetupXauthorityFile();
@ -1017,8 +1017,6 @@ sub ParseAndProcessCliOptions {
$displayNumber = &DetectDisplayNumberFromCliArgs() ||
&GetLowestAvailableDisplayNumber();
&CheckCliOptionsForBeingValid();
&DefineLogAndPidFilesForDisplayNumber();
}
sub PrepareDefaultsForPassingToXvnc {
@ -1081,3 +1079,8 @@ sub DefineLogAndPidFilesForDisplayNumber {
$desktopLog = "$vncUserDir/$host:$displayNumber.log";
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
}
sub PrepareLoggingAndXvncKillingFramework {
&CreateDotVncDir();
&DefineLogAndPidFilesForDisplayNumber();
}