freebsd-ports/sysutils/daedalus/files/daedalus.sh
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

28 lines
913 B
Bash

#!/bin/sh
#
# PROVIDE: daedalus
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable daedalus:
# daedalus_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable daedalus
# daedalus_flags (str): Set to "-c %%PREFIX%%/etc/daedalus/daedalus.xml -t %%PREFIX%%/etc/daedalus/templates.xml" by default.
# Extra flags passed to start command
#
. /etc/rc.subr
name="daedalus"
rcvar=daedalus_enable
command="%%PREFIX%%/bin/daedalus.rb"
pidfile="/var/run/daedalus.pid"
command_interpreter="%%RUBY_WITHOUT_SUFFIX%%"
required_files=%%PREFIX%%/etc/daedalus/daedalus.xml
[ -z "$daedalus_enable" ] && daedalus_enable="NO"
[ -z "$daedalus_flags" ] && daedalus_flags="-c %%PREFIX%%/etc/daedalus/daedalus.xml -t %%PREFIX%%/etc/daedalus/templates.xml"
load_rc_config $name
extra_commands="reload"
run_rc_command "$1"