summaryrefslogtreecommitdiffstats
path: root/testing/keepalived/keepalived.initd
diff options
context:
space:
mode:
authorPablo Castorino <pcastorino@mendoza-conicet.gob.ar>2010-12-27 14:51:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-28 13:52:48 +0000
commit9010f45d39cb7eb566227bd5259a9bbc6436d5d1 (patch)
tree2a49809cca3d34bc8d3b30191fac836e831d2174 /testing/keepalived/keepalived.initd
parent165f16e48c93875e1141c734ffde07c9e39c01db (diff)
downloadaports-9010f45d39cb7eb566227bd5259a9bbc6436d5d1.tar.bz2
aports-9010f45d39cb7eb566227bd5259a9bbc6436d5d1.tar.xz
testing/keepalived: new aport
Diffstat (limited to 'testing/keepalived/keepalived.initd')
-rwxr-xr-xtesting/keepalived/keepalived.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/keepalived/keepalived.initd b/testing/keepalived/keepalived.initd
new file mode 100755
index 000000000..a5b2bb9f9
--- /dev/null
+++ b/testing/keepalived/keepalived.initd
@@ -0,0 +1,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 $?
+}