diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/keepalived/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/keepalived/files')
-rw-r--r-- | sys-cluster/keepalived/files/keepalived.confd | 6 | ||||
-rw-r--r-- | sys-cluster/keepalived/files/keepalived.init | 33 |
2 files changed, 39 insertions, 0 deletions
diff --git a/sys-cluster/keepalived/files/keepalived.confd b/sys-cluster/keepalived/files/keepalived.confd new file mode 100644 index 000000000000..5f56cb23b031 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived.confd @@ -0,0 +1,6 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Keepalived options +# Increase logging: +#KEEPALIVED_OPTS="-D" diff --git a/sys-cluster/keepalived/files/keepalived.init b/sys-cluster/keepalived/files/keepalived.init new file mode 100644 index 000000000000..c290c9dbc518 --- /dev/null +++ b/sys-cluster/keepalived/files/keepalived.init @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use logger + # The interfaces do not actually need to exist to start, it handles them gracefully. + use net +} + +command="/usr/sbin/keepalived" +command_args="${KEEPALIVED_OPTS}" +pidfile="/var/run/keepalived.pid" + +extra_commands="checkconfig reload" + +checkconfig() { + # keepalived has a config check command, but it does not work while the daemon is running! + if [ ! -e /etc/keepalived/keepalived.conf ] ; then + eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived" + return 1 + fi +} + +start_pre() { + checkconfig || return 1 +} + +reload() { + ebegin "Reloading keepalived.conf" + start-stop-daemon --pidfile $pidfile --signal HUP + eend $? +} |