blob: 0151a7d4c503acefb1c707f59b9bd97673448050 (
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
# PROVIDE: hitch
# REQUIRE: LOGIN varnishd
# KEYWORD: shutdown
#
# Add some of the following variables to /etc/rc.conf to configure hitch:
# hitch_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable hitch.
# hitch_config (str): Default "%%PREFIX%%/etc/hitch.conf"
# Set it to the full path to the config file
# that hitch will use during the automated
# start-up.
# hitch_pidfile (str): Default "%%PREFIX%%/var/hitch/hitch.pid"
# Set it to the value of 'pid' in
# the hitch.conf file.
#
. /etc/rc.subr
name="hitch"
rcvar=hitch_enable
load_rc_config $name
: ${hitch_enable="NO"}
: ${hitch_config="%%PREFIX%%/etc/hitch.conf"}
: ${hitch_huser:=hitch}
: ${hitch_hgroup:=hitch}
command="%%PREFIX%%/sbin/hitch"
command_args="--daemon -u ${hitch_huser} -g ${hitch_hgroup} -s --config=${hitch_config}"
extra_commands=reload
required_files=${hitch_config}
run_rc_command "$1"
|