Attachments dir in package

pull/95/head v1.12.0
Philipp Heckel 2022-01-13 17:16:04 -05:00
parent c3170e1eb6
commit 51583f5d28
2 changed files with 4 additions and 2 deletions

View File

@ -59,6 +59,8 @@ nfpms:
dst: /lib/systemd/system/ntfy-client.service dst: /lib/systemd/system/ntfy-client.service
- dst: /var/cache/ntfy - dst: /var/cache/ntfy
type: dir type: dir
- dst: /var/cache/ntfy/attachments
type: dir
- dst: /usr/share/ntfy/logo.png - dst: /usr/share/ntfy/logo.png
src: server/static/img/ntfy.png src: server/static/img/ntfy.png
scripts: scripts:

View File

@ -8,8 +8,8 @@ if [ "$1" = "configure" ] || [ "$1" -ge 1 ]; then
if [ -d /run/systemd/system ]; then if [ -d /run/systemd/system ]; then
# Create ntfy user/group # Create ntfy user/group
id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy
chown ntfy.ntfy /var/cache/ntfy chown ntfy.ntfy /var/cache/ntfy /var/cache/ntfy/attachments
chmod 700 /var/cache/ntfy chmod 700 /var/cache/ntfy /var/cache/ntfy/attachments
# Hack to change permissions on cache file # Hack to change permissions on cache file
configfile="/etc/ntfy/server.yml" configfile="/etc/ntfy/server.yml"