Browse Source

First commit, base version A OK

master
jan 2 years ago
commit
79f9dd6961
3 changed files with 14 additions and 0 deletions
  1. +3
    -0
      ReadMe.md
  2. +1
    -0
      addresslog_data.csv
  3. +10
    -0
      addresslog_script.sh

+ 3
- 0
ReadMe.md View File

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

+ 1
- 0
addresslog_data.csv View File

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

+ 10
- 0
addresslog_script.sh 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

Loading…
Cancel
Save