Modify

Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#6220 closed defect (fixed)

/etc/init.d/stunnel restart cannot start stunnel

Reported by: moo <moo.tinys@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

works:

/etc/init.d/stunnel stop
/etc/init.d/stunnel start

works:

killall -9 stunnel
/etc/init.d/stunnel start

stunnel won't start with "restart"

/etc/init.d/stunnel restart

it looks like /etc/init.d/stunnel want to kill stunnel daemon but kill the script itself by kill -9 stunnel

the script do a kill -9 because simply kill (-TERM) does not take it down, but it seems kill -INT (kill -2) works fine

stop() {
  killall -INT stunnel
}

now /etc/init.d/stunnel restart works

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by moo <moo.tinys@…>

well, killall -INT stunnel did'nt work actually

start-stop-daemon may do the trick

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2008 OpenWrt.org

START=90

start() {
    if [ -s "/etc/stunnel/stunnel.pem" ]; then
        chmod og-rwx /etc/stunnel/stunnel.pem
        start-stop-daemon -S -x stunnel
    else
        [ -e /etc/stunnel/config ] && \
        . /etc/stunnel/config

        X509_CN=${X509_CN:-"router"}
        X509_O=${X509_O:-"openwrt.org"}
        X509_OU=${X509_OU:-"open-source firmware"}

        [ -x /sbin/keygen ] && {
        (keygen "$X509_CN" "$X509_O" "$X509_OU" > /etc/stunnel/stunnel.pem;
            chmod og-rwx /etc/stunnel/stunnel.pem;
            stunnel) &
        }
    fi
}

stop() {
    start-stop-daemon -K -x stunnel
    start-stop-daemon -K -s 9 -x stunnel
}

comment:2 Changed 8 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with r18994.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.