Mercurial > hg > anonet-resdb
annotate contrib/whoisd/whoisd-cached.sh @ 1215:7f3fc3fcba90 draft
adding self
author | opal hart <opal@wowana.me> |
---|---|
date | Sat, 25 Aug 2018 23:05:47 +0000 |
parents | a461bd595421 |
children |
rev | line source |
---|---|
1207
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
1 #!/bin/sh |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
2 cd /var/db/resdb |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
3 commit=$(git log -1 | head -n1 | tr -cd 'a-f0-9') |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
4 query=$(head -n1 | tr -cd 'a-zA-Z0-9.:_-') |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
5 if ! cat "/var/cache/whois/${commit}-${query}" 2>/dev/null;then |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
6 printf "%s\n" "${query}" | /var/db/resdb/contrib/whoisd/whoisd.pl | tee "/var/cache/whois/${commit}-${query}" |
a461bd595421
claimed n.ano for link shortener. some minor changes to whoisd and I guess pulled a new copy of marc.db.
epochqwert <epoch@hacking.allowed.org>
parents:
diff
changeset
|
7 fi |