Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub setEnv {
my $sshPid = getSshPid(user=>$ENV{LOGNAME}, psName=>'ssh-agent');
my $sshAuthSock = getSshAuthSock(sshPid=>$sshPid);
my %newEnvs = (
'SSH_AGENT_PID', $sshPid,
'SSH_AUTH_SOCK', $sshAuthSock,
);
foreach my $k (keys(%newEnvs)) {
if(!exists($ENV{$k}) || !$ENV{$k}) {
$ENV{$k} = $newEnvs{$k};
}
}
}
sub getSshAuthSock {
my %args = (@_);
my $FPID = $args{sshPid} - 1;
my $cmd = "find /tmp -path \"*ssh*\" -type s -iname \"agent.$FPID\"";
my $sshAuthSock = `$cmd`;
chomp($sshAuthSock);
return $sshAuthSock;
}
sub getSshPid {
my %args = (@_);
my $cmd = "ps -ef | grep $args{user} | grep $args{psName} | grep -v grep";
my $ret = `$cmd`;
my $pid = (split(/\s+/, $ret))[1];
return $pid;
}