summaryrefslogtreecommitdiff
path: root/japanese/esecanna/files/esecanna.sh
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>2000-07-05 12:37:06 +0000
committerThomas Gellekum <tg@FreeBSD.org>2000-07-05 12:37:06 +0000
commit546041ba3113a4a58d8f3e7e7cb90e78fcb38ea8 (patch)
tree7b9cd553a62be7a9bd52800d334be8b703eb93a1 /japanese/esecanna/files/esecanna.sh
parentFix a typo that broke make index. (diff)
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.
Notes
Notes: svn path=/head/; revision=30229
Diffstat (limited to '')
-rw-r--r--japanese/esecanna/files/esecanna.sh52
1 files changed, 36 insertions, 16 deletions
diff --git a/japanese/esecanna/files/esecanna.sh b/japanese/esecanna/files/esecanna.sh
index 8a9bf51da9a7..2cbbbef82a07 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