# Note: changes to this section of the spec may require synchronisation with the
# install.sh source based installation methodology.
#
# Add puppetdb group
getent group puppetdb > /dev/null || \
  groupadd -r puppetdb || :
# Add puppetdb user
if getent passwd puppetdb > /dev/null; then
  usermod --gid puppetdb --home %{_app_data} \
  --comment "puppetdb daemon" puppetdb || :
else
  useradd -r --gid puppetdb --home %{_app_data} --shell $(which nologin) \
    --comment "puppetdb daemon"  puppetdb || :
fi
