diff options
Diffstat (limited to 'puppet/modules/stunnel/templates/refresh_stunnel.sh.erb')
m--------- | puppet/modules/stunnel | 0 | ||||
-rw-r--r-- | puppet/modules/stunnel/templates/refresh_stunnel.sh.erb | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/puppet/modules/stunnel b/puppet/modules/stunnel deleted file mode 160000 -Subproject 523612fb6daff51837423619f5014e62dc83555 diff --git a/puppet/modules/stunnel/templates/refresh_stunnel.sh.erb b/puppet/modules/stunnel/templates/refresh_stunnel.sh.erb new file mode 100644 index 00000000..1af0cff7 --- /dev/null +++ b/puppet/modules/stunnel/templates/refresh_stunnel.sh.erb @@ -0,0 +1,22 @@ +#!/bin/sh -x + +for difference in `diff -q /etc/stunnel <%= @stunnel_staging %>/configs | grep differ | awk '{print $2}'` +do + old_config=`basename $difference` + /etc/init.d/stunnel4 stop $(basename $old_config .conf) + rm $difference +done + +for only in `diff -q /etc/stunnel <%= @stunnel_staging %>/configs | grep 'Only in /etc/stunnel:' | awk '{print $4}'` +do + old_config=`basename $only` + /etc/init.d/stunnel4 stop $(basename $only .conf) + rm /etc/stunnel/${only} +done + +cp <%= @stunnel_staging %>/configs/*.conf /etc/stunnel + +/etc/init.d/stunnel4 start + + + |