PREIN
/bin/sh
# Add the "jetty" user and group
getent group jetty &>/dev/null || groupadd -r -g 110 jetty || :
getent passwd jetty &>/dev/null || useradd -r -u 110 -g jetty \
-d /usr/share/jetty -M -s /sbin/nologin jetty || :
PREUN
/bin/sh
/usr/share/rpm-helper/del-service jetty $1 jetty
POSTIN
/bin/sh
/usr/bin/systemd-tmpfiles --create jetty.conf
/usr/share/rpm-helper/add-service jetty $1 jetty
POSTUN
/bin/sh
# Remove the user even during upgrade, it will be added later in %post.
# This is required to force incorrect UID to be replaced with the new one.
userdel jetty &>/dev/null || :
groupdel jetty &>/dev/null || :