Skip site navigation (1)Skip section navigation (2)
Date:      27 Jul 2001 20:49:36 -0000
From:      sean@chittenden.org
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        sean@chittenden.org, nbm@freebsd.org
Subject:   ports/29267: Update the svscan.sh startup script for daemontools
Message-ID:  <20010727204936.83039.qmail@wheel.tgd.net>

next in thread | raw e-mail | index | archive | help

>Number:         29267
>Category:       ports
>Synopsis:       Update the svscan.sh startup script for daemontools
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 27 13:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Sean Chittenden
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD wheel.tgd.net 4.3-STABLE FreeBSD 4.3-STABLE #0: Wed Jul 25 16:49:29 PDT 2001 sean@wheel.tgd.net:/usr/obj/usr/src/sys/WHEEL i386


	
>Description:
	Would it be possible to update svscan's rc.d/svscan.sh file to
	the version included?  svscan doesn't load properly with the
	current version.   (PS  there is a new version of the daemontools
	but this still applies)
>How-To-Repeat:
	N/A  install daemontools
>Fix:
	
#!/bin/sh

# Surely advice you to enable some of the below
# control variables and the apropriate ulimit.
# These are only examples.
# Furthermore, you should think about additional
# limits you might need.
# Or, check login.conf(5) for a suitable
# alternative
#
# I really do suggest you use /var/service as your
# service spool directory. Check hier(7) for
# reasons.

# 10 Mb
#MINSEGMENT=10240
# 20 Mb
#MAXSEGMENT=20480
# 10 Mb
#MAXFILESIZE=10240
# 100
#MAXFD=100
# 40
#MAXCHILD=40

# ulimits
#ulimit -d ${MINSEGMENT}
#ulimit -f ${MAXFILESIZE}
#ulimit -m ${MAXSEGMENT}
#ulimit -n ${MAXFD}
#ulimit -s ${MINSEGMENT}
#ulimit -u ${MAXCHILD}

if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
    echo "$0: Cannot determine the PREFIX" >&2
    exit 1
fi

case "$1" in
start)
	if [ -x ${PREFIX}/bin/svscan ]; then
		echo -n " svscan"
		env - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin \
			csh -cf 'svscan /var/service </dev/null 2>&1 &'
	fi	
	;;
status)
	if [ -x ${PREFIX}/bin/svstat ]; then
		${PREFIX}/bin/svstat /var/service/* /var/service/*/log
	fi
	;;
stop)
	killall svscan && echo -n ' svscan'
	;;
*)
	echo "Usage: `basename $0` {start|stop|status}" >&2
	;;
esac

exit 0
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010727204936.83039.qmail>