mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-29 21:39:24 +00:00
f62ffe4bc1
- Refer to the pid file and use the value to kill the running process instead of using killall(1) so as not to fail. - Drop `force' support and just recommend to run ${PREFIX}/sbin/esecannaserver directly, in a certain situation.
40 lines
792 B
Bash
40 lines
792 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
|
|
esecannaserver="!!PREFIX!!/sbin/esecannaserver"
|
|
|
|
case "$1" in
|
|
start)
|
|
if [ -f !!PREFIX!!/vje30/.version ] \
|
|
&& grep -qw 'FREE TRIAL VERSION' !!PREFIX!!/vje30/.version; then
|
|
echo ''
|
|
echo 'esecanna:'
|
|
echo ' Using VJE-Delta 3.0 trial, it is unable to connect to vjed on startup.'
|
|
echo ' Please execute $esecannaserver manually after once you run vje.'
|
|
exit 1
|
|
fi
|
|
|
|
if [ -x $esecannaserver ]; then
|
|
rm -f /tmp/.iroha_unix/IROHA
|
|
echo -n ' esecanna: '
|
|
$esecannaserver
|
|
fi
|
|
;;
|
|
stop)
|
|
pidfile="/var/run/esecanna.pid"
|
|
if [ -f $pidfile ]; then
|
|
kill `cat $pidfile` && echo -n ' esecanna'
|
|
rm $pidfile
|
|
else
|
|
echo ' esecanna: not running'
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: `basename $0` {start|stop}" >&2
|
|
exit 64
|
|
;;
|
|
esac
|
|
|
|
exit 0
|