Log the times when external IP address changes
This commit is contained in:
parent
d29cc73898
commit
496aa4c5dc
|
@ -93,6 +93,7 @@ function update_external_ip {
|
|||
echo 'if [[ "$curr_ip" != "$existing_ip" ]]; then' >> $ip_update_script
|
||||
echo " sed -i \"s|EXTERNAL_IPV4_ADDRESS=.*|EXTERNAL_IPV4_ADDRESS=\${curr_ip}|g\" $CONFIGURATION_FILE" >> $ip_update_script
|
||||
echo ' iptables-save > /etc/firewall.conf' >> $ip_update_script
|
||||
echo " echo \"\$(date)\" >> ~/${PROJECT_NAME}-external-ip-changes.txt" >> $ip_update_script
|
||||
echo 'fi' >> $ip_update_script
|
||||
|
||||
cron_add_mins 10 $ip_update_script
|
||||
|
|
Loading…
Reference in New Issue