First commit, base version A OK

This commit is contained in:
jan 2018-09-06 23:07:37 +02:00
commit 79f9dd6961
3 changed files with 14 additions and 0 deletions

3
ReadMe.md Normal file
View File

@ -0,0 +1,3 @@
# addresslog
Very basic ```sh``` script to log your IP into a csv file.

1
addresslog_data.csv Normal file
View File

@ -0,0 +1 @@
datetime(iso8601),hostname,IPv4,IPv6
1 datetime(iso8601) hostname IPv4 IPv6

10
addresslog_script.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
# Define vars
AL_CSV="addresslog_data.csv"
AL_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
AL_IPv4=$(curl -4s ifconfig.co)
AL_IPv6=$(curl -6s ifconfig.co)
printf "$AL_DATE,$(hostname),$AL_IPv4,$AL_IPv6\n" >> $AL_CSV