blob: a341a5ef3a840ddef57ebf1bea5ca7e484042633 (
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
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: gld.sh,v 1.4 2005/01/19 15:39:44 xtraeme Exp $
#
# PROVIDE: gld
# BEFORE: mail
# REQUIRE: DAEMON LOGIN
. /etc/rc.subr
name="gld"
rcvar=$name
command="@PREFIX@/bin/${name}"
required_files="@PKG_SYSCONFDIR@/$name.conf"
pidfile="@VARBASE@/run/${name}.pid"
extra_commands="gld_waitmysql_seconds"
: ${gld_waitmysql_seconds:=5}
start_precmd="waitmysql $gld_waitmysql_seconds"
if [ "$1" != "stop" -o "$1" != "status" ]; then
echo $(check_process $command) > $pidfile
fi
waitmysql()
{
_sec=$1
echo "$name: waiting for MySQL ${_sec} seconds..."
sleep ${_sec}
}
load_rc_config $name
run_rc_command "$1"
|