summaryrefslogtreecommitdiff
path: root/sysutils/lsyncd/files/lsyncd.in
blob: 77d52a1eaf3b29383d488b364c77ed09701150c6 (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
#!/bin/sh

# PROVIDE: lsyncd
# REQUIRE: LOGIN
# BEFORE:  securelevel
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable `lsyncd':
#
# lsyncd_enable="YES"
#

. /etc/rc.subr

name="lsyncd"
rcvar=lsyncd_enable

command="%%PREFIX%%/sbin/lsyncd"
pidfile="/var/run/$name.pid"

# read configuration and set defaults
load_rc_config "$name"
: ${lsyncd_enable="NO"}
: ${lsyncd_configfile:=%%PREFIX%%/etc/$name.conf}

required_files="${lsyncd_configfile}"

command_args="-pidfile $pidfile ${lsyncd_configfile}"

run_rc_command "$1"