summaryrefslogtreecommitdiff
path: root/dns/totd/files/totd.sh
blob: f21da7456630dec33ead9c53bcd10b1ffae43aea (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: totd
# REQUIRE: SERVERS
# BEFORE:  DAEMON
# KEYWORD: FreeBSD
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move totd.sh to /etc/rc.d/totd

prefix=%%PREFIX%%

# Define these totd_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/totd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
totd_enable=${totd_enable:-"NO"}		# Enable totd
#totd_program="${prefix}/sbin/totd"		# Location of totd
totd_flags=${totd_flags:-""}			# Flags to totd program

. %%RC_SUBR%%

name="totd"
rcvar=`set_rcvar`
command="${prefix}/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="${prefix}/etc/${name}.conf"

load_rc_config $name
run_rc_command "$1"