Browse Source

Log the times when external IP address changes

Bob Mottram 7 years ago
parent
commit
496aa4c5dc
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/freedombone-utils-network

+ 1
- 0
src/freedombone-utils-network View File

@@ -93,6 +93,7 @@ function update_external_ip {
93 93
     echo 'if [[ "$curr_ip" != "$existing_ip" ]]; then' >> $ip_update_script
94 94
     echo "  sed -i \"s|EXTERNAL_IPV4_ADDRESS=.*|EXTERNAL_IPV4_ADDRESS=\${curr_ip}|g\" $CONFIGURATION_FILE" >> $ip_update_script
95 95
     echo '  iptables-save > /etc/firewall.conf' >> $ip_update_script
96
+    echo "  echo \"\$(date)\" >> ~/${PROJECT_NAME}-external-ip-changes.txt" >> $ip_update_script
96 97
     echo 'fi' >> $ip_update_script
97 98
 
98 99
     cron_add_mins 10 $ip_update_script