From 9e634a70dac66e807d7d6e1a95e2c9f43cfcdd9d Mon Sep 17 00:00:00 2001 From: Ross Hettel Date: Wed, 21 Dec 2016 09:45:54 -0600 Subject: [PATCH] change logging --- transmission/updatePort.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmission/updatePort.sh b/transmission/updatePort.sh index 9cbb266c2..1af6b15e3 100755 --- a/transmission/updatePort.sh +++ b/transmission/updatePort.sh @@ -34,8 +34,9 @@ fi pia_response=$(curl -s -f -d "user=$pia_username&pass=$pia_passwd&client_id=$pia_client_id&local_ip=$local_vpn_ip" $port_assignment_url) # Check for curl error (curl will fail on HTTP errors with -f flag) -if [ $? -ne 0 ]; then - echo "Encountered an error looking up new port: $?" +ret=$? +if [ $ret -ne 0 ]; then + echo "curl encountered an error looking up new port: $ret" fi # Check for errors in PIA response