Also make sure not to overwrite an existing config file.
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1476
cb58f699-b61c-0410-a6fe-
9272a202ed29
%post
/sbin/ldconfig
+# Plug the shibboleth SP into Apache2 on a Red Hat system.
+[ -d %{_sysconfdir}/httpd/conf.d ] || exit 0
+[ -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf ] && exit 0
+cp -p %{_sysconfdir}/shibboleth/apache2.config \
+ %{_sysconfdir}/httpd/conf.d/shibboleth.conf
+
%postun
/sbin/ldconfig
+# delete the shibboleth apache configuration if we're being removed
+[ "$0" = 0 ] || exit 0
+[ -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf ] && \
+ rm -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf
+
%triggerin selinux-targeted-policy -- %{name}
restorecon %{_sbindir}/shar