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