На всякий случай напишу тут решение:
Добавил параметр в /etc/ipsec.conf:
leftupdown=/usr/lib/ipsec/_updown
а в самом скрипте /usr/lib/ipsec/_updown 2 строки дописал:
...
case "$PLUTO_VERB:$1" in
...
up-client:)
# connection to my client subnet coming up
# If you are doing a custom version, firewall commands go here.
/usr/local/bin/tg_say.sh User ${PLUTO_USERNAME} with ip ${PLUTO_PEER} is CONNECTED
;;
down-client:)
# connection to my client subnet going down
# If you are doing a custom version, firewall commands go here.
/usr/local/bin/tg_say.sh User ${PLUTO_USERNAME} with ip ${PLUTO_PEER} is disconnected
...