added transmission-blocklist ci script
This commit is contained in:
commit
c31bbf36a4
23
.drone.yml
Normal file
23
.drone.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download GeoLite.mmdb
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- ./blocklist-build.sh
|
||||||
|
- cp -v blocklist.gz upload/
|
||||||
|
environment:
|
||||||
|
LICENSE_KEY:
|
||||||
|
from_secret: LICENSE_KEY
|
||||||
|
- name: Release databases
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://git.paulbsd.com
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
files: "upload/*"
|
||||||
|
when:
|
||||||
|
event: tag
|
8
blocklist-build.sh
Executable file
8
blocklist-build.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
curl -s https://www.iblocklist.com/lists.json | \
|
||||||
|
jq -r '.lists[] | .name as $n | select((.subscription == "false") and ($n | startswith("iana-") | not) and (["fornonlancomputers", "bogon", "The Onion Router"] | index($n) | not)) | .list' | \
|
||||||
|
awk 'length($0) > 2 { print "http://list.iblocklist.com/?fileformat=p2p&archiveformat=gz&list=" $0 }' | \
|
||||||
|
xargs wget -O - | \
|
||||||
|
gunzip | \
|
||||||
|
egrep -v '^#' | \
|
||||||
|
gzip > blocklist.gz
|
Loading…
Reference in New Issue
Block a user