Redhat compliant fixes in %preun

- don't delete pandora user. see https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Allocation_Strategies
 - don't delete log files and files which created by user.
This commit is contained in:
KIKUCHI Koichiro 2016-03-03 18:57:00 +09:00
parent 6e7acb3124
commit b29d4394c2
1 changed files with 9 additions and 6 deletions

View File

@ -114,21 +114,24 @@ fi
/sbin/chkconfig --del pandora_agent_daemon
/etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || :
/usr/sbin/userdel pandora
rm -Rf /etc/pandora/pandora_agent.conf
rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null
rm -Rf /usr/share/pandora_agent
# Remove symbolic links
pushd /etc/pandora
for f in pandora_agent.conf plugins collections
do
[ -L $f ] && rm -f $f
done
exit 0
%files
%defattr(750,pandora,root)
%defattr(750,root,root)
/usr/bin/pandora_agent
/usr/bin/pandora_agent_exec
%defattr(755,pandora,root)
%{prefix}/pandora_agent
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/etc/rc.d/init.d/pandora_agent_daemon