From 57154a010b22fb506132d917071645451afcb158 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 4 Nov 2022 23:10:14 +0200
Subject: [PATCH] Flush DNS script.

To flush the DNS resolvers' cache.
---
 Documents/bin/flush-dns | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 Documents/bin/flush-dns

diff --git a/Documents/bin/flush-dns b/Documents/bin/flush-dns
new file mode 100644
index 0000000..e18d9da
--- /dev/null
+++ b/Documents/bin/flush-dns
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+if wb -u
+then
+    flatpak-spawn --host \
+        sudo systemctl restart systemd-resolved.service
+else
+    sudo systemctl restart systemd-resolved.service
+fi
+ssh ns1.shore.co.il doas rcctl restart unbound
-- 
GitLab