summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/gld/files/gld.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/mail/gld/files/gld.sh b/mail/gld/files/gld.sh
index 73e66ae020c..a341a5ef3a8 100644
--- a/mail/gld/files/gld.sh
+++ b/mail/gld/files/gld.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: gld.sh,v 1.3 2004/11/29 16:17:22 xtraeme Exp $
+# $NetBSD: gld.sh,v 1.4 2005/01/19 15:39:44 xtraeme Exp $
#
# PROVIDE: gld
@@ -14,10 +14,21 @@ 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"