sendTelegram


sendTelegram

#!/bin/bash cd ~/tg while read line; do if [ "$line" = "" ]; then break fi read -ra lineSplit <<< $line status=${lineSplit[9]} if [ $status = "Exited" ] then name=${lineSplit[-1]} ip="$(/sbin/ifconfig | awk '/inet addr/{print substr($2,6)}' | awk 'NR==3 {print $1}')" msg="${name} ${status} ${ip}" ./bin/telegram-cli -k tg-server.pub -c telegram.h -WR -e "msg Monitor ${msg}" fi done <<< "$(docker ps -a | grep 'Exit')"...



원문링크 : sendTelegram