From aacdda94e16f3aa16b4b43e9654c454bdd62bedf Mon Sep 17 00:00:00 2001
From: Philipp Heckel <pheckel@datto.com>
Date: Thu, 9 Dec 2021 14:07:09 -0500
Subject: [PATCH] chmod 600 for cache file

---
 scripts/postinst.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/postinst.sh b/scripts/postinst.sh
index 8ecf6c52..843805c3 100755
--- a/scripts/postinst.sh
+++ b/scripts/postinst.sh
@@ -18,6 +18,7 @@ if [ "$1" = "configure" ] && [ -d /run/systemd/system ]; then
     cachefile="$(cat "$configfile" | perl -n -e'/^\s*cache-file: ["'"'"']?([^"'"'"']+)["'"'"']?/ && print $1')" # Oh my, see #47
     if [ -n "$cachefile" ]; then
       chown ntfy.ntfy "$cachefile" || true
+      chmod 600 "$cachefile" || true
     fi
   fi