summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichael Mogenson2018-10-24 16:39:06 -0400
committerMichael Mogenson2018-11-29 14:32:39 -0500
commitc77442af659ef4cd2293ccfbdbcbf3404f892075 (patch)
tree3c0c169dee17eaf09a1e98bda917b7696d316862 /PKGBUILD
downloadaur-fetch-hosts.tar.gz
fetch-hosts AUR package
This package is a systemd timer and service to fetch an adblocking and malware blocking hosts file from https://github.com/StevenBlack/hosts on a weekly basis and install it to /etc/hosts.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1457251054c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Mike Mogenson <michael.mogenson@gmail.com>
+pkgname=fetch-hosts
+pkgver=1
+pkgrel=1
+pkgdesc="Fetch new adware and malware blocking hosts file from Steven Black's GitHub repo."
+arch=('any')
+depends=('curl')
+license=('GPL')
+source=('fetch-hosts.service' 'fetch-hosts.timer')
+md5sums=('c18dc82875f0c74cdc0c419d4cdc68c2' 'fee12eb2cc54311af21e2f6be740895a')
+
+package() {
+ cd "$srcdir"
+
+ SYSD="$pkgdir/usr/lib/systemd/system" # systemd services directory
+ install -dm755 "$SYSD"
+ install -m644 "fetch-hosts.service" "$SYSD"
+ install -m644 "fetch-hosts.timer" "$SYSD"
+
+ # heads up to enable systemd service
+ echo -e "\e[32m" # green text
+ echo "------------------------------------------------------------"
+ echo "Run 'systemctl enable fetch-hosts.timer' to enable timer"
+ echo "Enable either 'NetworkManager-wait-online.service' or"
+ echo " 'systemd-networkd-wait-online.service' for timer to work"
+ echo "------------------------------------------------------------"
+ echo -e "\e[0m" # normal text
+}