blob: 5e34e28fe587bfca3034cb591aa16d5aa33920f3 (
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
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: ebusd
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable ebusd:
#
#ebusd_enable (bool): set to "YES" to start domotics at boot
#ebusd_user (str): Default to ebusd, user for starting ebusd
#ebusd_group (str): Default to ebusd, group for stating ebusd
#ebusd_pidfile (str): Custum PID file path and name
# Default to "/var/run/ebusd/${hostname}.pid".
#ebusd_args (str): Custom additional arguments to be passed
# Default to "-d /dev/ttyU0 --scanconfig --localhost"
. /etc/rc.subr
name="ebusd"
rcvar="ebusd_enable"
load_rc_config $name
: ${ebusd_user:=ebusd}
: ${ebusd_group:=ebusd}
: ${ebusd_enable:=NO}
: ${ebusd_args:="-d /dev/ttyU0 --scanconfig --localhost"}
pidfile=${ebusd_pidfile:-"/var/run/ebusd/${hostname}.pid"}
command="%%PREFIX%%/bin/ebusd"
command_args="--pidfile ${pidfile} ${ebusd_args}"
run_rc_command "$1"
|