diff options
author | Masafumi Max NAKANE <max@FreeBSD.org> | 2002-05-16 07:49:43 +0000 |
---|---|---|
committer | Masafumi Max NAKANE <max@FreeBSD.org> | 2002-05-16 07:49:43 +0000 |
commit | 60db3026133753bec531207af02423f7861146f7 (patch) | |
tree | 51777e55abfe3a566e8fe18224e07bc74304fe85 /japanese/canna-server/files | |
parent | Upgrade to version 2.1 RC2. (diff) |
- Canna doesn't use /var/run any longer.
- Improve the startup script.
- Modify the pkg-plist so that pkg_delete won't complain even when
user dictionaries are installed.
- Use correct syntax for chown (bin.bin -> bin:bin)
Credits: nyan@jp.FreeBSD.org
nork@FreeBSD.org
takachan@running-dog.net
knu@iDaemons.org
Notes
Notes:
svn path=/head/; revision=59233
Diffstat (limited to 'japanese/canna-server/files')
-rw-r--r-- | japanese/canna-server/files/canna.sh.in | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/japanese/canna-server/files/canna.sh.in b/japanese/canna-server/files/canna.sh.in index a44a0b7df8e2..950751f81cc2 100644 --- a/japanese/canna-server/files/canna.sh.in +++ b/japanese/canna-server/files/canna.sh.in @@ -1,19 +1,22 @@ #!/bin/sh -canna=@PREFIX@/sbin/cannaserver + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 64 +fi + case "$1" in start) - if [ -f $canna ]; then - rm -f /var/run/canna/Canna.pid - mkdir -p /var/run/canna - touch /var/log/CANNA0msgs - chown bin:bin /var/run/canna /var/log/CANNA0msgs - echo -n ' Canna' - $canna + if [ -x ${PREFIX}/sbin/cannaserver ]; then + @RM@ -f /tmp/.iroha_unix/IROHA + @TOUCH@ /var/log/CANNA0msgs + @CHOWN@ bin:bin /var/log/CANNA0msgs + ${PREFIX}/sbin/cannaserver && echo -n ' canna' fi ;; stop) - @PREFIX@/sbin/cannakill && echo -n ' Canna' + ${PREFIX}/sbin/cannakill && echo -n ' canna' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 |