summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-03-24 11:30:47 -0400
committerMicah Anderson <micah@riseup.net>2011-03-24 11:30:47 -0400
commit7b8d4cbca0ed75477f3b34ae8dbd12c9db7a72f1 (patch)
tree7f3b22a140b0d44eab3cc198e386faf76b516626
parent4a03582b35641a997425a1ac0a805ec11c73ab4c (diff)
parent9411ac8374d84e567e2a73b133f45a0794e28ecc (diff)
Merge remote-tracking branch 'immerda/master'
-rw-r--r--files/CentOS/stunnel.init10
-rw-r--r--manifests/centos.pp8
2 files changed, 12 insertions, 6 deletions
diff --git a/files/CentOS/stunnel.init b/files/CentOS/stunnel.init
index 9b4b798..d5c60fd 100644
--- a/files/CentOS/stunnel.init
+++ b/files/CentOS/stunnel.init
@@ -54,6 +54,12 @@ if [ ! -f $CONF ] ; then
exit 0
fi
+CHROOT=`grep '^chroot' /etc/stunnel/stunnel.conf | head -n 1 | sed 's/ //g' | awk -F= '{ print $2 }'`
+PIDFILE=`grep '^pid' /etc/stunnel/stunnel.conf | head -n 1 | sed 's/ //g' | awk -F= '{ print $2 }'`
+if [ -n "$CHROOT" ]; then
+ PIDFILE=$CHROOT/$PIDFILE
+fi
+
# Path to the lock file.
#
LOCK_FILE=/var/lock/subsys/stunnel
@@ -96,7 +102,7 @@ stop() {
else
echo -n $"Shutting down $prog: "
- killproc stunnel
+ killproc -p $PIDFILE stunnel
RETVAL=$?
[ $RETVAL -eq 0 ]
rm -f $LOCK_FILE
@@ -126,7 +132,7 @@ case "$1" in
fi
;;
status)
- status stunnel
+ status -p $PIDFILE stunnel
RETVAL=$?
;;
*)
diff --git a/manifests/centos.pp b/manifests/centos.pp
index 14eb907..f22b322 100644
--- a/manifests/centos.pp
+++ b/manifests/centos.pp
@@ -1,7 +1,7 @@
class stunnel::centos inherits stunnel::linux {
file{'/etc/init.d/stunnel':
- source => "puppet://$server/modules/stunnel/${operatingsystem}/stunnel.init",
+ source => "puppet:///modules/stunnel/${operatingsystem}/stunnel.init",
require => Package['stunnel'],
before => Service['stunnel'],
owner => root, group => 0, mode => 0755;
@@ -19,9 +19,9 @@ class stunnel::centos inherits stunnel::linux {
}
file{'/etc/stunnel/stunnel.conf':
- source => [ "puppet://$server/modules/site-stunnel/${fqdn}/stunnel.conf",
- "puppet://$server/modules/site-stunnel/stunnel.conf",
- "puppet://$server/modules/stunnel/${operatingsystem}/stunnel.conf" ],
+ source => [ "puppet:///modules/site-stunnel/${fqdn}/stunnel.conf",
+ "puppet:///modules/site-stunnel/stunnel.conf",
+ "puppet:///modules/stunnel/${operatingsystem}/stunnel.conf" ],
require => Package['stunnel'],
notify => Service['stunnel'],
owner => root, group => 0, mode => 0600;