add ipset-blacklist
This commit is contained in:
parent
05151d38b6
commit
2f5daf5168
31
ipset-blacklist/PKGBUILD
Normal file
31
ipset-blacklist/PKGBUILD
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
pkgname=ipset-blacklist
|
||||||
|
pkgver=r133.ebfe5a5
|
||||||
|
pkgrel=1
|
||||||
|
arch=(any)
|
||||||
|
url="https://github.com/trick77/ipset-blacklist"
|
||||||
|
makedepends=('git')
|
||||||
|
depends=('ipset' 'iptables' 'curl')
|
||||||
|
source=(
|
||||||
|
git+https://github.com/trick77/ipset-blacklist.git
|
||||||
|
'ipset-blacklist.service'
|
||||||
|
'ipset-blacklist.timer'
|
||||||
|
)
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'89e0b207644b7640539ca66e87b99b6c8fcfae8409ed7b36999f8c7e65896afb'
|
||||||
|
'ebd5dc1a38b650beaeeb70451c7315be1286ae10b945f5a2baa593502af32609')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "${srcdir}/${pkgname}"
|
||||||
|
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${srcdir}"
|
||||||
|
install -Dm644 ipset-blacklist.service "$pkgdir/usr/lib/systemd/system/ipset-blacklist.service"
|
||||||
|
install -Dm644 ipset-blacklist.timer "$pkgdir/usr/lib/systemd/system/ipset-blacklist.timer"
|
||||||
|
|
||||||
|
cd "${srcdir}/${pkgname}"
|
||||||
|
install -Dm644 ipset-blacklist.conf "$pkgdir/etc/ipset-blacklist/ipset-blacklist.conf"
|
||||||
|
install -Dm755 update-blacklist.sh "$pkgdir/usr/bin/update-blacklist.sh"
|
||||||
|
}
|
10
ipset-blacklist/ipset-blacklist.service
Normal file
10
ipset-blacklist/ipset-blacklist.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ipset-blacklist
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/update-blacklist.sh /etc/ipset-blacklist/ipset-blacklist.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
ipset-blacklist/ipset-blacklist.timer
Normal file
10
ipset-blacklist/ipset-blacklist.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daily ipset-blacklist update
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
AccuracySec=12h
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user