summaryrefslogtreecommitdiff
blob: ee778171b0941b83b922b1b2c888fdcc88a8799e (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/multiskkserv/files/multiskkserv.initd,v 1.3 2004/07/14 21:26:08 agriffis Exp $

depend() {
	need net
}

start() {
	if [ -e /var/run/multiskkserv.pid ] ; then
		eerror "Anothor pid file is detected."
		eerror "If you are sure any multiskkserv is not running,"
		eerror "please rm /var/run/multiskkserv manually."
	fi

	ebegin "Starting multiskkserv"
	start-stop-daemon --start --quiet --background \
		--make-pidfile --pidfile /var/run/multiskkserv.pid \
		--startas /usr/sbin/multiskkserv -- \
			-r /usr/share/skk ${SKKJISYO_CDB}
	eend $?
}

stop() {
	ebegin "Stopping multiskkserv"
	start-stop-daemon --stop --quiet \
		--pidfile /var/run/multiskkserv.pid \
		--startas /usr/sbin/multiskkserv
	eend $?
	[ -e /var/run/multiskkserv.pid ] && rm /var/run/multiskkserv.pid
}