diff options
author | tg <tg@FreeBSD.org> | 2000-07-05 12:37:06 +0000 |
---|---|---|
committer | tg <tg@FreeBSD.org> | 2000-07-05 12:37:06 +0000 |
commit | 3a84881f168162a487490bbbd275ca05b7f5560d (patch) | |
tree | e888acd7e17d635c1f902fccb1eefdf89f15641a /japanese/esecanna | |
parent | 83513fef56c1c9996eb040a93488ed7837fac927 (diff) | |
download | FreeBSD-ports-3a84881f168162a487490bbbd275ca05b7f5560d.zip FreeBSD-ports-3a84881f168162a487490bbbd275ca05b7f5560d.tar.gz |
As threatened on freebsd-ports: all startup scripts know about the two
options `start' and `stop' now (unless I have forgotten any). This allows
us to call the scripts from /etc/rc.shutdown with the correct option.
The (42 or so) ports that already DTRT before are unchanged.
Diffstat (limited to 'japanese/esecanna')
-rw-r--r-- | japanese/esecanna/files/esecanna.sh | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/japanese/esecanna/files/esecanna.sh b/japanese/esecanna/files/esecanna.sh index 8a9bf51..2cbbbef 100644 --- a/japanese/esecanna/files/esecanna.sh +++ b/japanese/esecanna/files/esecanna.sh @@ -1,20 +1,40 @@ #!/bin/sh -if [ -f /usr/local/vje30/.version ] \ - && grep -qw 'FREE TRIAL VERSION' /usr/local/vje30/.version \ - && [ X"$1" != X"-f" ]; then - echo "" - echo "esecanna:" - echo " Using VJE-Delta 3.0 trial, it is unable to connect to vjed on startup." - echo " Please execute \`$0 -f' manually" - echo " after once you run vje." - exit -fi - esecannaserver="!!PREFIX!!/sbin/esecannaserver" -if [ -x $esecannaserver ]; then - rm -f /tmp/.iroha_unix/IROHA - echo -n ' esecannai: ' - $esecannaserver -fi +case "$1" in +restart) + if [ -x $esecannaserver ]; then + rm -f /tmp/.iroha_unix/IROHA + echo -n ' esecannai: ' + $esecannaserver + fi + ;; +start) + if [ -f !!PREFIX!!/vje30/.version ] \ + && grep -qw 'FREE TRIAL VERSION' !!PREFIX!!/vje30/.version \ + && [ X"$1" != X"restart" ]; then + echo "" + echo "esecanna:" + echo " Using VJE-Delta 3.0 trial, it is unable to connect to vjed on startup." + echo " Please execute \`$0 restart' manually" + echo " after once you run vje." + exit 1 + fi + + if [ -x $esecannaserver ]; then + rm -f /tmp/.iroha_unix/IROHA + echo -n ' esecannai: ' + $esecannaserver + fi + ;; +stop) + killall $esecannaserver && echo -n ' esecannai' + ;; +*) + echo "Usage: `basename $0` {restart|start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 |