summaryrefslogtreecommitdiff
path: root/net/oidentd/files/oidentd.sh
blob: e65f1c3199e1102354ccf0dccfb7058f7210aaf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: oidentd.sh,v 1.1.1.1 2004/01/03 23:21:45 tron Exp $
#

# PROVIDE: oidentd
# REQUIRE: DAEMON

conf_file="@PKG_SYSCONFDIR@/oidentd.conf"

name="oidentd"
rcvar=$name
command="@PREFIX@/sbin/${name}"
required_files="${conf_file}"

if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
	. /etc/rc.subr
	. /etc/rc.conf

	load_rc_config $name
	run_rc_command "$1"

else				# old NetBSD, Solaris, Linux, etc...

	case $1 in
	start)
		if [ -x ${command} -a -f ${conf_file} ] ; then
			eval ${command} && @ECHO@ -n " ${name}"
		fi
		;;
	stop)
		${stop_cmd}
		;;
	*)
		@ECHO@ "Usage: $0 {start|stop}" 1>&2
		exit 64
		;;
	esac

fi