stunnel not running? (check /var/run/stunnel/stunnel.pid)

Noah admin2 at enabled.com
Sat Jun 7 02:50:27 UTC 2008


Okay I am not understanding something with stunnel. it appears that 
stunnel cant start because it cant create a pid file.  It happens every 
time I upgrade it.

# /usr/local/etc/rc.d/stunnel restart
stunnel not running? (check /var/run/stunnel/stunnel.pid).
Starting stunnel.
# /usr/local/etc/rc.d/stunnel restart
stunnel not running? (check /var/run/stunnel/stunnel.pid).
Starting stunnel.
#

Anybody help me understand things here.  so here is the relevent output 
which I can provide some clues.


# ls -ld /var/run/stunnel/
drwxrwxr-x  2 stunnel  stunnel  512 Jun  5 14:28 /var/run/stunnel/
# cat /usr/local/etc/stunnel/stunnel.conf
# Sample stunnel configuration file
# Copyright by Michal Trojnara 2002

# Comment it out on Win32
cert = /usr/local/etc/stunnel/mail.pem
chroot = /var/run/stunnel
#chroot = /var/run
# PID is created inside chroot jail
pid = /stunnel.pid
setuid = stunnel
setgid = stunnel
# grep stunnel /etc/rc.conf
stunnel_enable="YES"
# cat /usr/local/etc/rc.d/stunnel
#!/bin/sh
#
# $FreeBSD: ports/security/stunnel/files/stunnel.in,v 1.9 2008/01/26 
14:18:12 roam Exp $
#

# PROVIDE: stunnel
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add some of the following variables to /etc/rc.conf to configure stunnel:
# stunnel_enable (bool):        Set to "NO" by default.
#                               Set it to "YES" to enable stunnel.
# stunnel_config (str):         Default 
"/usr/local/etc/stunnel/stunnel.conf"
#                               Set it to the full path to the config file
#                               that stunnel will use during the automated
#                               start-up.
# stunnel_pidfile (str):        Default "/usr/local/var/stunnel/stunnel.pid"
#                               Set it to the value of 'pid' in
#                               the stunnel.conf file.
#

. /etc/rc.subr

name="stunnel"
rcvar=`set_rcvar`

load_rc_config $name

: ${stunnel_enable="NO"}
: ${stunnel_config="/usr/local/etc/stunnel/${name}.conf"}
: ${stunnel_pidfile="/var/run/stunnel/${name}.pid"}

command="/usr/local/bin/stunnel"
command_args=${stunnel_config}
pidfile=${stunnel_pidfile}

required_files="${stunnel_config}"

run_rc_command "$1"



------

any ideas?

Cheers,

Noah




More information about the freebsd-questions mailing list