summaryrefslogtreecommitdiff
path: root/japanese/FreeWnn-server/files/twnn.in
blob: 7672d6963bdd44b3e56719a7e294644a611cb4a7 (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
#!/bin/sh

# PROVIDE: twnn
# REQUIRE: LOGIN
# KEYWORD: shutdown
#

. /etc/rc.subr

name=twnn
rcvar=twnn_enable
command=%%PREFIX%%/bin/cWnn4/tserver
procname=%%PREFIX%%/bin/cWnn4/tserver
start_precmd=start_precmd
stop_postcmd=stop_postcmd
WTCMD=%%PREFIX%%/bin/cWnn4/cwnntouch

: ${twnn_enable:=NO}

start_precmd()
{
	rm -f /tmp/td_sockV4
	install -d -o wnn -m 755 %%PREFIX%%/lib/wnn/zh_TW/dic/usr
	${WTCMD} %%PREFIX%%/lib/wnn/zh_TW/dic/sys/*
}

stop_postcmd()
{
	rm -f /tmp/td_sockV4
}

load_rc_config $name
run_rc_command $1