From: warlord Date: Fri, 1 Apr 2005 18:28:54 +0000 (+0000) Subject: Plug the SP into Apache automatically (if the config dir exists). X-Git-Tag: 2.4~1528 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=90c06a89634208fc783d47ee96033394048e09fe;hp=31c08d373538be5aa835da7bfc0e091bac6e994b;p=shibboleth%2Fsp.git Plug the SP into Apache automatically (if the config dir exists). 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 --- diff --git a/shibboleth.spec.in b/shibboleth.spec.in index a071619..afd2431 100644 --- a/shibboleth.spec.in +++ b/shibboleth.spec.in @@ -84,9 +84,20 @@ make check %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