From 51583f5d289a26a9e1a83de8170c35f0b2c108ff Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Thu, 13 Jan 2022 17:16:04 -0500 Subject: [PATCH] Attachments dir in package --- .goreleaser.yml | 2 ++ scripts/postinst.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d30b177b..74863ea5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -59,6 +59,8 @@ nfpms: dst: /lib/systemd/system/ntfy-client.service - dst: /var/cache/ntfy type: dir + - dst: /var/cache/ntfy/attachments + type: dir - dst: /usr/share/ntfy/logo.png src: server/static/img/ntfy.png scripts: diff --git a/scripts/postinst.sh b/scripts/postinst.sh index 542df521..8e19d659 100755 --- a/scripts/postinst.sh +++ b/scripts/postinst.sh @@ -8,8 +8,8 @@ if [ "$1" = "configure" ] || [ "$1" -ge 1 ]; then if [ -d /run/systemd/system ]; then # Create ntfy user/group id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy - chown ntfy.ntfy /var/cache/ntfy - chmod 700 /var/cache/ntfy + chown ntfy.ntfy /var/cache/ntfy /var/cache/ntfy/attachments + chmod 700 /var/cache/ntfy /var/cache/ntfy/attachments # Hack to change permissions on cache file configfile="/etc/ntfy/server.yml"