head	1.3;
access;
symbols
	pkgsrc-2013Q2:1.3.0.54
	pkgsrc-2013Q2-base:1.3
	pkgsrc-2012Q4:1.3.0.52
	pkgsrc-2012Q4-base:1.3
	pkgsrc-2011Q4:1.3.0.50
	pkgsrc-2011Q4-base:1.3
	pkgsrc-2011Q2:1.3.0.48
	pkgsrc-2011Q2-base:1.3
	pkgsrc-2009Q4:1.3.0.46
	pkgsrc-2009Q4-base:1.3
	pkgsrc-2008Q4:1.3.0.44
	pkgsrc-2008Q4-base:1.3
	pkgsrc-2008Q3:1.3.0.42
	pkgsrc-2008Q3-base:1.3
	cube-native-xorg:1.3.0.40
	cube-native-xorg-base:1.3
	pkgsrc-2008Q2:1.3.0.38
	pkgsrc-2008Q2-base:1.3
	pkgsrc-2008Q1:1.3.0.36
	pkgsrc-2008Q1-base:1.3
	pkgsrc-2007Q4:1.3.0.34
	pkgsrc-2007Q4-base:1.3
	pkgsrc-2007Q3:1.3.0.32
	pkgsrc-2007Q3-base:1.3
	pkgsrc-2007Q2:1.3.0.30
	pkgsrc-2007Q2-base:1.3
	pkgsrc-2007Q1:1.3.0.28
	pkgsrc-2007Q1-base:1.3
	pkgsrc-2006Q4:1.3.0.26
	pkgsrc-2006Q4-base:1.3
	pkgsrc-2006Q3:1.3.0.24
	pkgsrc-2006Q3-base:1.3
	pkgsrc-2006Q2:1.3.0.22
	pkgsrc-2006Q2-base:1.3
	pkgsrc-2006Q1:1.3.0.20
	pkgsrc-2006Q1-base:1.3
	pkgsrc-2005Q4:1.3.0.18
	pkgsrc-2005Q4-base:1.3
	pkgsrc-2005Q3:1.3.0.16
	pkgsrc-2005Q3-base:1.3
	pkgsrc-2005Q2:1.3.0.14
	pkgsrc-2005Q2-base:1.3
	pkgsrc-2005Q1:1.3.0.12
	pkgsrc-2005Q1-base:1.3
	pkgsrc-2004Q4:1.3.0.10
	pkgsrc-2004Q4-base:1.3
	pkgsrc-2004Q3:1.3.0.8
	pkgsrc-2004Q3-base:1.3
	pkgsrc-2004Q2:1.3.0.6
	pkgsrc-2004Q2-base:1.3
	pkgsrc-2004Q1:1.3.0.4
	pkgsrc-2004Q1-base:1.3
	pkgsrc-2003Q4:1.3.0.2
	pkgsrc-2003Q4-base:1.3
	netbsd-1-6-1:1.2.0.4
	netbsd-1-6-1-base:1.2
	netbsd-1-6:1.2.0.6
	netbsd-1-6-RELEASE-base:1.2
	pkgviews:1.2.0.2
	pkgviews-base:1.2
	buildlink2:1.1.1.1.0.2
	buildlink2-base:1.1.1.1
	netbsd-1-5-PATCH003:1.1.1.1
	pkgsrc-base:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.3
date	2003.07.29.17.26.01;	author jmmv;	state dead;
branches;
next	1.2;

1.2
date	2002.07.06.20.36.58;	author tv;	state Exp;
branches;
next	1.1;

1.1
date	2001.10.21.21.26.52;	author seb;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.10.21.21.26.52;	author seb;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Convert to the bsd.pkg.install.mk framework to handle the daemon's user and
group, the creation of log files and automatic handling of the rc.d script.
Bump PKGREVISION to 1.  Ok'ed by seb@@, the maintainer.
@
text
@#! /bin/sh
#
# $NetBSD: ircd-hybrid,v 1.2 2002/07/06 20:36:58 tv Exp $
#
# PROVIDE: ircdhybrid
# REQUIRE: DAEMON

name="ircdhybrid"
rcvar=$name
pidfile="@@PPATH@@"
command="@@SPATH@@"
conffile="@@DPATH@@ircd.conf"
required_files="$conffile"
start_precmd=set_pid_file

set_pid_file () {
	@@TOUCH@@ $pidfile && @@CHOWN@@ @@USER@@ $pidfile && @@CHMOD@@ 600 $pidfile
}

if [ -d /etc/rc.d ]; then :; else
	command=${1:-start}

	case ${command} in
	start)
	if [ -x @@SPATH@@ -a -f  "$conffile" ]
	then
		echo "Starting ${name}."
		set_pid_file || exit 1
		exec @@SPATH@@
	fi
	;;
	stop)
	if [ -f ${pidfile} ]; then
		pid=`head -1 ${pidfile}`
		echo "Stopping ${name}."
		kill -TERM ${pid}
	else
		echo "${name} not running?"
	fi
	;;
	restart)
	( $0 stop )
	sleep 1
	$0 start
	;;
	status)
	if [ -f ${pidfile} ]; then
		pid=`head -1 ${pidfile}`
		echo "${name} is running as pid ${pid}."
	else
		echo "${name} is not running."
	fi
	;;
	esac
	exit 0
fi

. /etc/rc.subr

load_rc_config $name
run_rc_command "$1"
@


1.2
log
@Set $rcvar so this can be properly enabled/disabled in rc.conf.
@
text
@d3 1
a3 1
# $NetBSD: ircd-hybrid,v 1.1.1.1 2001/10/21 21:26:52 seb Exp $
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
# $NetBSD$
d9 1
@


1.1.1.1
log
@Added ircd-hybrid version 6.2, an IRC daemon.
@
text
@@
