blob: ebce1977d5471dfce58a7d91a93305898890c3d1 (
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
|
#!/bin/sh
# PROVIDE: garage
# REQUIRE: NETWORKING
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf.local or /etc/rc.conf to enable garage:
#
# garage_enable="YES"
#
. /etc/rc.subr
name=garage
desc="Distributed object storage"
rcvar=${name}_enable
# read configuration and set defaults
load_rc_config $name
: ${garage_enable="NO"}
: ${garage_config="%%PREFIX%%/etc/garage.toml"}
: ${garage_log_file="/var/log/garage.log"}
command=/usr/sbin/daemon
procname="%%PREFIX%%/bin/${name}"
required_files=${garage_config}
pidfile=/var/run/${name}.pid
command_args="-p $pidfile -H -o ${garage_log_file} -f $procname -c ${garage_config} server"
status_cmd="$procname -c ${garage_config} status"
run_rc_command "$1"
|