octopus
Part of the Furniture
I'm strugeling with this and can't get it working. Is there som smart guy's have any suggestion?
I'm trying to choose different "tun" inteface to send my mail on. eg. route-up on "tun11" and route-pre-down on "tun13" (have both running)
But it seems only one tun interface is used (tun11).
This is only som code <snippets>
Thanks !!!
vpn=$1 (tun [1-5])
I'm trying to choose different "tun" inteface to send my mail on. eg. route-up on "tun11" and route-pre-down on "tun13" (have both running)
But it seems only one tun interface is used (tun11).
This is only som code <snippets>
Thanks !!!
vpn=$1 (tun [1-5])
if echo "${script_type}" = "route-up" && echo "$vpn" | grep -oE "[3]"; then INFACE="tun13"; fi
if echo "${script_type}" = "route-pre-down" && echo "$vpn" | grep -oE "[3]"; then INFACE="tun11"; fi
I know, maby in wrong thread.......send(){
case $1 in
mail)
/usr/sbin/curl -s -S -4 --interface "$INFACE" \
--url smtps://$SMTP:$PORT \
--ssl-reqd \
--mail-auth $USERNAME \
--user "$USERNAME:$PASSWORD" \
--mail-from $FROM_ADDRESS \
--mail-rcpt $TO_1 \
--upload-file /tmp/rc-mail.txt
RC=$?
;;