summarylogtreecommitdiffstats
path: root/update-github520-hosts.service
diff options
context:
space:
mode:
authortaotieren2023-12-25 14:13:48 +0800
committertaotieren2023-12-25 14:13:48 +0800
commitcefd6909c5fec5e4e8d70ce228ca78c363e92a5e (patch)
treee86940ed86cd1a22b4dad619886ed6e2b4e46395 /update-github520-hosts.service
downloadaur-cefd6909c5fec5e4e8d70ce228ca78c363e92a5e.tar.gz
update github520-git
Diffstat (limited to 'update-github520-hosts.service')
-rw-r--r--update-github520-hosts.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/update-github520-hosts.service b/update-github520-hosts.service
new file mode 100644
index 000000000000..8f2078fb9de2
--- /dev/null
+++ b/update-github520-hosts.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Update GitHub520 Hosts File
+After=network.target
+
+[Service]
+User=root
+PermissionsStartOnly=true
+ExecStart=/bin/bash -c 'sed -i "/# GitHub520 Host Start/Q" /etc/hosts && wget -O - https://raw.hellogithub.com/hosts >> /etc/hosts'
+Restart=on-failure
+RestartSec=30
+StartLimitInterval=3min
+
+[Install]
+WantedBy=default.target