Closed
Description
On the first install attempt user and group creation fail, because the syntax of chown is incorrect:
chown ntfy.ntfy /var/cache/ntfy /var/cache/ntfy/attachments /var/lib/ntfy
It should ntfy:ntfy.
On uninstall the group is not necessarily removed, if fx. the apache user is added to it to allow reading the socket. This means that on the next install attempt
id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy fails, when useradd tries to add the group again.
The fedora packaging guidelines at https://fedoraproject.org/wiki/Packaging:UsersAndGroups suggest:
getent group GROUPNAME >/dev/null || groupadd -r GROUPNAME
getent passwd USERNAME >/dev/null || \
useradd -r -g GROUPNAME -d HOMEDIR -s /sbin/nologin \
-c "Useful comment about the purpose of this account" USERNAME
exit 0
In this case #565 could also do the job.
Metadata
Metadata
Assignees
Labels
No labels