From 634b02802f6b12925b5818144ed81e06dbc1a0c6 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 3 Apr 2010 18:39:50 +0200 Subject: add pidfile to check status status failed often due to a missing pidfile. Add a hardcoded pidfile to improve the status query. Note: in general the status script should be improved! So see this rather as a quickfix. --- files/CentOS/stunnel.init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/CentOS/stunnel.init b/files/CentOS/stunnel.init index 9b4b798..023568b 100644 --- a/files/CentOS/stunnel.init +++ b/files/CentOS/stunnel.init @@ -57,6 +57,8 @@ fi # Path to the lock file. # LOCK_FILE=/var/lock/subsys/stunnel +# pidfile to be used +pidfile=/var/run/stunnel/stunnel.pid #==================================================================== @@ -126,7 +128,7 @@ case "$1" in fi ;; status) - status stunnel + status -p $pidfile stunnel RETVAL=$? ;; *) -- cgit v1.2.3 From 3cf4f620ea96162e989f883ba65cf09bed29fcb0 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 5 May 2010 21:53:12 +0200 Subject: improve stunnel init.d script --- files/CentOS/stunnel.init | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/files/CentOS/stunnel.init b/files/CentOS/stunnel.init index 023568b..d5c60fd 100644 --- a/files/CentOS/stunnel.init +++ b/files/CentOS/stunnel.init @@ -54,11 +54,15 @@ 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 -# pidfile to be used -pidfile=/var/run/stunnel/stunnel.pid #==================================================================== @@ -98,7 +102,7 @@ stop() { else echo -n $"Shutting down $prog: " - killproc stunnel + killproc -p $PIDFILE stunnel RETVAL=$? [ $RETVAL -eq 0 ] rm -f $LOCK_FILE @@ -128,7 +132,7 @@ case "$1" in fi ;; status) - status -p $pidfile stunnel + status -p $PIDFILE stunnel RETVAL=$? ;; *) -- cgit v1.2.3 From 9411ac8374d84e567e2a73b133f45a0794e28ecc Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 7 Aug 2010 02:42:18 +0200 Subject: remove unnecessary fileserver variable (#2460) --- manifests/centos.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- cgit v1.2.3