--- rpms/phpki-ng/contribs10/phpki-ng.spec 2022/12/17 07:19:17 1.17 +++ rpms/phpki-ng/contribs10/phpki-ng.spec 2022/12/28 20:13:45 1.18 @@ -274,6 +274,12 @@ cd .. rm -rf $RPM_BUILD_ROOT %pre +if ! /usr/bin/id phpki &>/dev/null; then + echo "Creating phpki user" + /usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ + %logmsg "Unexpected error adding user \"phpki\". Abort installation." +fi + echo "******************************************************" echo "* " echo "* !!! IMPORTANT - READ THIS NOW !!! " @@ -320,13 +326,6 @@ else fi - -if ! /usr/bin/id phpki &>/dev/null; then - echo "Creating phpki user" - /usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ - %logmsg "Unexpected error adding user \"phpki\". Abort installation." -fi - %preun