mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-05 21:48:49 +01:00
vncserver: extract CreateUserConfigIfNeeded()
This commit is contained in:
parent
08ede14dfe
commit
69a2f9a13b
@ -129,14 +129,7 @@ if (! $skipxstartup) {
|
||||
&CreateXstartupIfNeeded();
|
||||
}
|
||||
|
||||
# Create the user's config file if necessary.
|
||||
if (!(-e "$vncUserDir/config")) {
|
||||
warn "Creating default config $vncUserDir/config\n";
|
||||
open(VNCUSERCONFIG, ">$vncUserDir/config");
|
||||
print VNCUSERCONFIG $defaultConfig;
|
||||
close(VNCUSERCONFIG);
|
||||
chmod 0644, "$vncUserDir/config";
|
||||
}
|
||||
&CreateUserConfigIfNeeded();
|
||||
|
||||
# Run the X startup script.
|
||||
if (! $skipxstartup) {
|
||||
@ -958,3 +951,15 @@ sub WaitForXvncToStart {
|
||||
sub UsingSafeFontPath {
|
||||
$fontPath eq $defFontPath
|
||||
}
|
||||
|
||||
sub CreateUserConfigIfNeeded {
|
||||
if (-e "$vncUserDir/config") {
|
||||
return;
|
||||
}
|
||||
|
||||
warn "Creating default config $vncUserDir/config\n";
|
||||
open(VNCUSERCONFIG, ">$vncUserDir/config");
|
||||
print VNCUSERCONFIG $defaultConfig;
|
||||
close(VNCUSERCONFIG);
|
||||
chmod 0644, "$vncUserDir/config";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user