vncserver: extract $kasmPasswdFile

KASM-1609_select_de_to_run
Dmitry Maksyoma 4 years ago
parent c99d82fd8b
commit ffb88ee8e6

@ -94,6 +94,7 @@ my %config;
&DisableVncAuth(); &DisableVncAuth();
$kasmAuthEnabled = 1; $kasmAuthEnabled = 1;
$kasmPasswdFile = "$ENV{HOME}/.kasmpasswd";
if ($kasmAuthEnabled) { if ($kasmAuthEnabled) {
&TellUserToSetupUserAndPassword(); &TellUserToSetupUserAndPassword();
@ -841,9 +842,9 @@ sub DisableVncAuth() {
} }
sub TellUserToSetupUserAndPassword { sub TellUserToSetupUserAndPassword {
if (!(-e "$ENV{HOME}/.kasmpasswd")) { if (!(-e $kasmPasswdFile)) {
warn "\nYou will require a password to access your desktops.\n\n"; warn "\nYou will require a password to access your desktops.\n\n";
system($exedir."kasmvncpasswd $ENV{HOME}/.kasmpasswd"); system($exedir."kasmvncpasswd $kasmPasswdFile");
if (($? >> 8) != 0) { if (($? >> 8) != 0) {
exit 1; exit 1;
} }

Loading…
Cancel
Save