summaryrefslogtreecommitdiffstats
path: root/testing/keepalived/keepalived.initd
blob: a5b2bb9f98571ba654619c3fb4e39d5c3b6841c3 (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
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

KEEPALIVED_BIN="/usr/sbin/keepalived"
KEEPALIVED_CFG=${KEEPALIVED_CFG:-/etc/keepalived/keepalived.conf}

depend() {
	use logger
	need net
	after firewall
}

start() {
	ebegin "Starting keepalived"
	start-stop-daemon --start --exec "${KEEPALIVED_BIN}" \
		-- -f "${KEEPALIVED_CFG}" ${KEEPALIVED_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping keepalived"
	start-stop-daemon --stop --exec "${KEEPALIVED_BIN}"
	eend $?
}