diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-15 17:48:01 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-15 18:12:34 +0200 |
commit | b583bcceafca79047bb5636026fd75aa54fca679 (patch) | |
tree | cc897399216d99b0285625b6b59ecf4e45e5801b /testing/keepalived/keepalived.initd | |
parent | 611311720446c33e88d84a998e0b404cdbc2b679 (diff) | |
download | aports-b583bcceafca79047bb5636026fd75aa54fca679.tar.bz2 aports-b583bcceafca79047bb5636026fd75aa54fca679.tar.xz |
testing/keepalived: improve runscript, remove misleading checkconfig
checkconfig should check a config file for syntax and maybe semantic
errors, not just that the file exists. This is useless and misleading.
Also keepalived does NOT provide a functionality for checking config
file for errors like nginx (its check command is for something else).
Diffstat (limited to 'testing/keepalived/keepalived.initd')
-rw-r--r--[-rwxr-xr-x] | testing/keepalived/keepalived.initd | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/testing/keepalived/keepalived.initd b/testing/keepalived/keepalived.initd index c290c9dbc5..760c360c89 100755..100644 --- a/testing/keepalived/keepalived.initd +++ b/testing/keepalived/keepalived.initd @@ -2,28 +2,18 @@ # 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 -} +extra_commands="reload" command="/usr/sbin/keepalived" command_args="${KEEPALIVED_OPTS}" -pidfile="/var/run/keepalived.pid" - -extra_commands="checkconfig reload" +pidfile="/run/keepalived.pid" +required_files="/etc/keepalived/keepalived.conf" -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 +depend() { + use logger + # The interfaces do not actually need to exist to start, + # it handles them gracefully. + use net } reload() { |