blob: f75e1f8a5a2382a216f52c9ab637433399ea3dea (
plain) (
blame)
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
|
#!/bin/sh
# PROVIDE: conduit
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# conduit_enable (bool): Set to NO by default.
# Set it to YES to enable conduit.
# conduit_config (path): Set to %%PREFIX%%/etc/conduit.toml
# by default.
. /etc/rc.subr
name=conduit
rcvar=conduit_enable
desc="Conduit server"
load_rc_config $name
: ${conduit_enable:=NO}
: ${conduit_config:="%%PREFIX%%/etc/conduit.toml"}
command=/usr/sbin/daemon
procname=%%PREFIX%%/bin/conduit
pidfile=/var/run/${name}.pid
conduit_env="CONDUIT_CONFIG=${conduit_config}"
command_args="-P /var/run/daemon_${name}.pid -p $pidfile -u %%USERS%% -H -c -o /var/log/conduit.log $procname"
run_rc_command "$1"
|