# .bash_profile # Get the aliases and functions #pom 11-3-2562 #wiboon 7-3-2562 if [ -f ~/.bashrc ]; then . ~/.bashrc fi #-------------------------------- TOKEN1='' #-------------------------------- # User specific environment and startup programs WHO1=$(whoami) #TOKENTEST='RUQa6xFPa8fYn3zugzSF34pbvTpDw0iJ41DEs8ETOtj' IP1=$(ip -4 address show $(ip route | grep default | awk '{print $5}') | grep inet | head -1 | awk '{ print $2 }' | cut -f1 -d/) IP2=$(last -a |grep still | awk '{print $(NF)}' | head -1) OS1=$(cat /etc/*rel* |grep ^NAME= | cut -d\= -f2 | head -1 | tr -d " ") OS2=$(cat /etc/*rel* |grep ^VERSION= | cut -d\= -f2 | head -1 | tr -d " ") curl -X POST -H 'Authorization: Bearer '${TOKEN1}'' -F 'message='${WHO1}'@'${IP1}' '${OS1}''${OS2}' from '${IP2}' '$(date +%F_%R)'' https://notify-api.line.me/api/notify PATH=$PATH:$HOME/bin export PATH # http://tinyw.in/3ul2