1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/japanese/esecanna/files/esecanna.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

52 lines
1.1 KiB
Bash

#!/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=esecanna_enable
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"