Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Problem: chown command is run for all upgrades
Browse files Browse the repository at this point in the history
Solution: only run chown if ownership permissions are not apache:pulp

re: #4948
https://pulp.plan.io/issues/4948
re: #4949
https://pulp.plan.io/issues/4949
  • Loading branch information
dkliban committed Jun 11, 2019
1 parent 03bdde3 commit 1ed1956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/pulp/pulp.spec
Expand Up @@ -509,7 +509,9 @@ if [ $1 -gt 1 ] ; then
/sbin/service pulp_celerybeat stop > /dev/null 2>&1 || :
/sbin/service pulp_resource_manager stop > /dev/null 2>&1 || :
%endif
/usr/bin/chown -R apache:pulp /var/lib/pulp
if [ $(stat -c '%U:%G' /var/lib/pulp) != 'apache:pulp' ] ; then
/usr/bin/chown -R apache:pulp /var/lib/pulp
fi
fi

%preun server
Expand Down

0 comments on commit 1ed1956

Please sign in to comment.