Browse Source

curl silent mode

Bob Mottram 7 years ago
parent
commit
797b2a3a35
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/freedombone-utils-network

+ 2
- 2
src/freedombone-utils-network View File

87
 }
87
 }
88
 
88
 
89
 function get_external_ipv4_address {
89
 function get_external_ipv4_address {
90
-    curl ipinfo.io/ip
90
+    curl -s ipinfo.io/ip
91
 }
91
 }
92
 
92
 
93
 function get_ipv4_address {
93
 function get_ipv4_address {
104
     ip_update_script=/usr/bin/externalipupdate
104
     ip_update_script=/usr/bin/externalipupdate
105
     { echo '#!/bin/bash';
105
     { echo '#!/bin/bash';
106
       echo "existing_ip=\$(cat $CONFIGURATION_FILE | grep \"EXTERNAL_IPV4_ADDRESS=\" | head -n 1 | awk -F '=' '{print \$2}')'";
106
       echo "existing_ip=\$(cat $CONFIGURATION_FILE | grep \"EXTERNAL_IPV4_ADDRESS=\" | head -n 1 | awk -F '=' '{print \$2}')'";
107
-      echo "curr_ip=\$(curl ipinfo.io/ip)";
107
+      echo "curr_ip=\$(curl -s ipinfo.io/ip)";
108
       echo "if [[ \"\$curr_ip\" != \"\$existing_ip\" ]]; then";
108
       echo "if [[ \"\$curr_ip\" != \"\$existing_ip\" ]]; then";
109
       echo "  sed -i \"s|EXTERNAL_IPV4_ADDRESS=.*|EXTERNAL_IPV4_ADDRESS=\${curr_ip}|g\" $CONFIGURATION_FILE";
109
       echo "  sed -i \"s|EXTERNAL_IPV4_ADDRESS=.*|EXTERNAL_IPV4_ADDRESS=\${curr_ip}|g\" $CONFIGURATION_FILE";
110
       echo "  echo \"\$(date)\" >> ~/${PROJECT_NAME}-external-ip-changes.txt";
110
       echo "  echo \"\$(date)\" >> ~/${PROJECT_NAME}-external-ip-changes.txt";