blob: 6306ecbfbe97a5e4c6fb7ee494e8124f7e170c5b (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: esecanna
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# esecanna_enable (bool): Set to NO by default.
# Set it to YES to enable esecanna.
. /etc/rc.subr
name=esecanna
rcvar=`set_rcvar`
esecannaserver=%%PREFIX%%/sbin/esecannaserver
# XXX
command=/usr/bin/nohup
command_args=">/dev/null $esecannaserver"
procname=$esecannaserver
pidfile=/var/run/esecanna/esecanna.pid
esecanna_chdir="$(dirname $pidfile)"
required_files=%%PREFIX%%/etc/esecannarc
start_precmd="esecanna_prestart"
esecanna_prestart () {
if [ -f %%PREFIX%%/vje30/.version ] \
&& grep -qw 'FREE TRIAL VERSION' %%PREFIX%%/vje30/.version; then
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 255
fi
/bin/rm -f /tmp/.iroha_unix/IROHA
/bin/mkdir -p /var/run/esecanna
}
load_rc_config $name
: ${esecanna_enable="NO"}
run_rc_command "$1"
|