diff options
author | varac <varacanero@zeromail.org> | 2013-06-14 20:36:35 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-06-14 20:36:35 +0200 |
commit | 1a12adc97d70224a0e750c6ab8a41073ced72d2b (patch) | |
tree | c6c00ece73c7ddb9813869e2b10b6a862e26c035 /templates/refresh_stunnel.sh.erb | |
parent | 9b2e9699885497612fbc5d70363611ad51383f96 (diff) | |
parent | a4b8195e7a5d444448b3750d66ec725d6f7c67ab (diff) |
Merge remote-tracking branch 'origin/master' into leap_master
Diffstat (limited to 'templates/refresh_stunnel.sh.erb')
-rw-r--r-- | templates/refresh_stunnel.sh.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/templates/refresh_stunnel.sh.erb b/templates/refresh_stunnel.sh.erb new file mode 100644 index 0000000..1af0cff --- /dev/null +++ b/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 + + + |