Viewing File: /usr/local/cpanel/whostmgr/libexec/remote_host_calculation_shell_code.template

export CALC_TTY=`tty | sed -e "s/\/dev\///g"`;
export CALC_HOST=`(w -hli 2>/dev/null || w -hl 2>/dev/null || w -hi) | grep " $CALC_TTY " | awk '{print $3}'`;
export SSH_HOST=`echo $SSH_CONNECTION | awk '{print $1}'`;
if [ "$SSH_HOST" != "" ]; then
  export REMOTE_HOST=$SSH_HOST;
else
  export REMOTE_HOST=$CALC_HOST;
fi;
Back to Directory File Manager