diff options
author | 2015-04-17 12:03:11 +0000 | |
---|---|---|
committer | 2015-04-17 12:03:11 +0000 | |
commit | f4a8e9d0ee166c8a50b34a230577f123a28f411b (patch) | |
tree | d38cbe8075254567f725aefa727e920d43fa0ce1 /net-misc/stunnel/files | |
parent | Version bump. (diff) | |
download | gentoo-2-f4a8e9d0ee166c8a50b34a230577f123a28f411b.tar.gz gentoo-2-f4a8e9d0ee166c8a50b34a230577f123a28f411b.tar.bz2 gentoo-2-f4a8e9d0ee166c8a50b34a230577f123a28f411b.zip |
Cleanup older versions.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'net-misc/stunnel/files')
-rw-r--r-- | net-misc/stunnel/files/stunnel.initd | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/net-misc/stunnel/files/stunnel.initd b/net-misc/stunnel/files/stunnel.initd deleted file mode 100644 index cf33c04f085c..000000000000 --- a/net-misc/stunnel/files/stunnel.initd +++ /dev/null @@ -1,73 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Default pidfile location -DEFAULT_PIDFILE="/var/run/stunnel/stunnel.pid" -FILES="/etc/stunnel/*.conf" -DAEMON="/usr/sbin/stunnel" - -depend() { - need net - before logger -} - -get_pids() { - local file=${1} - if test -f ${file} ; then - CHROOT=$(grep "^chroot" ${file} | sed "s;.*= *;;") - PIDFILE=$(grep "^pid" ${file} | sed "s;.*= *;;") - if [ "${PIDFILE}" == "" ] ; then - PIDFILE="${DEFAULT_PIDFILE}" - fi - if test -f ${CHROOT}/${PIDFILE} ; then - cat ${CHROOT}/${PIDFILE} - fi - fi -} - -start() { - rm -rf /var/run/stunnel/*.pid - ebegin "Starting stunnel" - for file in ${FILES} ; do - if test -f "${file}" ; then - ARGS="${file} ${STUNNEL_OPTIONS}" - PROCLIST="$(get_pids ${file})" - CHROOT=$(grep "^chroot" ${file} | sed "s;.*= *;;") - PIDFILE=$(grep "^pid" ${file} | sed "s;.*= *;;") - if [ "${PROCLIST}" ] && kill -0 ${PROCLIST} 2> /dev/null ; then - ewarn " already running: ${file} " - elif ${DAEMON} ${ARGS} ; then - if ! test -f ${CHROOT}/${PIDFILE} ; then - # give the daemon time to create the pid file - # See bug #308931 for more details - sleep 0.5s - fi - if test -f ${CHROOT}/${PIDFILE} ; then - einfo " ${file}" - else - eerror " error starting: ${file}" - fi - fi - fi - done - eend $? -} - -stop() { - ebegin "Stopping stunnel" - for file in ${FILES} ; do - PROCLIST=$(get_pids ${file}) - if [ "${PROCLIST}" ] && kill -0 ${PROCLIST} 2> /dev/null ; then - kill ${PROCLIST} - einfo " ${file} " - fi - done - eend $? -} - -restart() { - svc_stop - sleep 1 - svc_start -} |