# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

function title { echo -en "\033]2;$1:$2\007"; }
function cd { dir=$1; if [ -z "$dir" ]; then dir=~; fi; builtin cd "$dir" && title `hostname` `pwd`; }
cd `pwd`

echo '=========================================================='
if [ -f "/etc/redhat-release" ]; then
  cat /etc/redhat-release
elif [ -f "/etc/debian_version" ]; then
  echo 'Debian '`cat /etc/debian_version`
fi
echo ''
uname -a
echo ''
echo 'Hostname  : '`hostname`
ipaddr=$(wget --prefer-family=ipv4 -qO - api.51.is/ip)
echo 'IPv4 addr : '$ipaddr
echo 'Nat  addr : '`/sbin/ifconfig |awk '/inet / {print $2}'|cut -d':' -f2|grep -v 127.0.0.1|grep -v $ipaddr`

echo '=========================================================='
df -lh
echo '=========================================================='
free -m
echo ''
echo 'Status:'`uptime`
echo ''
lsmod | grep bbr
echo ''
PS1="[\u@\h \W]\\$ "