diff options
Diffstat (limited to 'textproc/dict-server/files/dictd.sh')
-rw-r--r-- | textproc/dict-server/files/dictd.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/textproc/dict-server/files/dictd.sh b/textproc/dict-server/files/dictd.sh new file mode 100644 index 00000000000..2cf0daf7a5d --- /dev/null +++ b/textproc/dict-server/files/dictd.sh @@ -0,0 +1,31 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dictd.sh,v 1.1 2009/12/30 11:55:49 abs Exp $ +# +# PROVIDE: dictd +# REQUIRE: LOGIN + +. /etc/rc.subr + +name="dictd" +unload_cmd="dictd_unload" +load_cmd="dictd_load" +dictd_flags=${dictd_flags-"--pp '@PATH_TO_M4@ -P'"} +rcvar=$name +command="@PREFIX@/sbin/${name}" +pidfile="/var/run/${name}.pid" +required_files="@PKG_SYSCONFDIR@/dictd.conf" +extra_commands="reload unload load" + +dictd_load (){ + echo "Loading dictd databases." + kill -HUP $(check_pidfile $pidfile $name) +} + +dictd_unload (){ + echo "Unloading dictd databases." + kill -USR1 $(check_pidfile $pidfile $name) +} + +load_rc_config $name +run_rc_command "$1" |