mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-07 14:39:48 +01:00
vncserver: extract CreateXstartup()
This commit is contained in:
parent
53c545a9ad
commit
25e761326f
21
unix/vncserver
Normal file → Executable file
21
unix/vncserver
Normal file → Executable file
@ -386,13 +386,7 @@ warn "\nUsername: $vncUserName\n\n";
|
||||
|
||||
# Create the user's xstartup script if necessary.
|
||||
if (! $skipxstartup) {
|
||||
if (!(-e "$xstartupFile")) {
|
||||
warn "Creating default startup script $xstartupFile\n";
|
||||
open(XSTARTUP, ">$xstartupFile");
|
||||
print XSTARTUP $defaultXStartup;
|
||||
close(XSTARTUP);
|
||||
chmod 0755, "$xstartupFile";
|
||||
}
|
||||
&CreateXstartup();
|
||||
}
|
||||
|
||||
# Create the user's config file if necessary.
|
||||
@ -909,3 +903,16 @@ sub SanityCheck
|
||||
$SOCK_STREAM = &SOCK_STREAM;
|
||||
}
|
||||
}
|
||||
|
||||
sub CreateXstartup
|
||||
{
|
||||
if ((-e "$xstartupFile")) {
|
||||
return;
|
||||
}
|
||||
|
||||
warn "Creating default startup script $xstartupFile\n";
|
||||
open(XSTARTUP, ">$xstartupFile");
|
||||
print XSTARTUP $defaultXStartup;
|
||||
close(XSTARTUP);
|
||||
chmod 0755, "$xstartupFile";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user