First commit, base version A OK
This commit is contained in:
commit
79f9dd6961
|
@ -0,0 +1,3 @@
|
||||||
|
# addresslog
|
||||||
|
|
||||||
|
Very basic ```sh``` script to log your IP into a csv file.
|
|
@ -0,0 +1 @@
|
||||||
|
datetime(iso8601),hostname,IPv4,IPv6
|
|
|
@ -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
|
Loading…
Reference in New Issue