• Bug#265449: Stunnel init script fails to stop stunnel.

    From Wilfried Goesgens@1:229/2 to All on Fri Aug 13 11:20:07 2004
    From: [email protected]

    Package: stunnel4
    Version: 2:4.050-1
    Severity: grave
    Tags: patch


    ps aux |grep stunnel
    gives me:
    nobody 6677 0.0 0.7 3492 1844 ? Ss 09:39 0:00
    [stunnel4]
    nobody 6679 0.0 0.6 3344 1592 ? Ss 09:39 0:00
    [stunnel4]
    nobody 6681 0.0 0.6 3344 1592 ? Ss 09:39 0:00
    [stunnel4]
    nobody 6683 0.0 0.7 3492 1908 ? Ss 09:39 0:00
    [stunnel4]
    nobody 6684 0.0 0.7 3492 1908 ? S 09:39 0:00
    [stunnel4]
    nobody 7233 0.0 0.7 3492 1844 ? S 09:40 0:00
    [stunnel4]
    so grepping for the full processname from the ps output won't work.
    instead i've tried to get the actual pid from the pid-file referenced
    by the config-file:


    killdaemons()
    {
    for file in $FILES; do
    if test -f $file; then
    CHROOT=`grep ^chroot $file|sed "s;.*= *;;"`
    PIDFILE=`grep ^pid $file|sed "s;.*= *;;"`
    PROCLIST=`cat $CHROOT/$PIDFILE`
    if [ "$PROCLIST" ]; then
    kill $PROCLIST
    echo -n "[stopped: $file] "
    fi
    fi
    done
    }
    each config does need a uniq pidfile, else it won't work.
    but i would say it's an error if the logfile and the pid-file
    aren't uniq for each instance.
    perhaps a dialog on update would be nice to warn users?



    -- System Information:
    Debian Release: testing/unstable
    APT prefers testing
    APT policy: (500, 'testing')
    Architecture: i386 (i686)
    Kernel: Linux 2.4.20
    Locale: LANG=C, LC_CTYPE=C

    Versions of packages stunnel4 depends on:
    ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libssl0.9.7 0.9.7d-3 SSL shared libraries
    ii libwrap0 7.6.dbs-4 Wietse Venema's TCP wrappers libra ii netbase 4.17 Basic TCP/IP networking system
    ii openssl 0.9.7d-3 Secure Socket Layer (SSL) binary a

    -- no debconf information


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)