aboutsummaryrefslogtreecommitdiff
path: root/network/shibboleth-sp/doinst.sh
diff options
context:
space:
mode:
authorThibaut Notteboom <tib@tibux.org>2013-03-03 12:45:36 -0600
committerRobby Workman <rworkman@slackbuilds.org>2013-03-03 12:45:36 -0600
commite82df38da0f608d618b623fe024ab3fa8950bb17 (patch)
tree08a3cc3130a2ce436ab422a176a758c12defa61c /network/shibboleth-sp/doinst.sh
parentba84a34c191db5a047da568d5c670f18ea37861b (diff)
network/shibboleth-sp: Added (Shibboleth Service Provider)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/shibboleth-sp/doinst.sh')
-rw-r--r--network/shibboleth-sp/doinst.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/network/shibboleth-sp/doinst.sh b/network/shibboleth-sp/doinst.sh
new file mode 100644
index 000000000000..62214b7f2a93
--- /dev/null
+++ b/network/shibboleth-sp/doinst.sh
@@ -0,0 +1,31 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.shibboleth.new
+config etc/httpd/extra/mod_shib.conf.new
+find etc/shibboleth/ -name *.html.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.logger.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.pem.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.xml.new | while read cfg ; do config $cfg ; done
+