summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/keepalived/files/init-keepalived')
-rw-r--r--sys-cluster/keepalived/files/init-keepalived9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys-cluster/keepalived/files/init-keepalived b/sys-cluster/keepalived/files/init-keepalived
index de6c3d2d264f..c7b34c3a260f 100644
--- a/sys-cluster/keepalived/files/init-keepalived
+++ b/sys-cluster/keepalived/files/init-keepalived
@@ -1,13 +1,15 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/files/init-keepalived,v 1.3 2004/07/15 00:55:17 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/files/init-keepalived,v 1.4 2007/04/30 06:45:49 robbat2 Exp $
depend() {
use logger
need net
}
+PIDFILE=/var/run/keepalived.pid
+
checkconfig() {
if [ ! -e /etc/keepalived/keepalived.conf ] ; then
eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived"
@@ -18,13 +20,12 @@ checkconfig() {
start() {
checkconfig || return 1
ebegin "Starting Keepalived"
- start-stop-daemon --start --quiet --pidfile /var/run/keepalived.pid \
- --startas /usr/sbin/keepalived
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /usr/sbin/keepalived
eend $?
}
stop() {
ebegin "Stopping Keepalived"
- start-stop-daemon --stop --quiet --pidfile /var/run/keepalived.pid
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
eend $?
}