aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsyncd/lsyncd.initd
blob: 782c7f391e692551b599d7f46ea72b1bd608f56c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/sbin/openrc-run

command=/usr/bin/lsyncd
pidfile=/var/run/lsyncd/${SVCNAME}.pid
conf=/etc/lsyncd/${SVCNAME}.lua

: ${exec_user:=root}
: ${exec_group:=root}

start_stop_daemon_args="--user $exec_user --group $exec_group --chdir /etc/lsyncd"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath --directory ${pidfile%/*} --owner ${exec_user}:${exec_group}
	command_args="$conf -pidfile $pidfile $command_args"
}