mirror of https://github.com/openwrt/packages.git
keepalived: add startup and shutdown script handling
The keepalived does support script call handling on start and stop. All scripts located under '/etc/hotplug.d/keepalived' gets now called with the env ACTION set to startup or shutdown. The script that want to get called on this keepalived events could evalutate this env to run on startup or shutdown. Signed-off-by: Florian Eckert <fe@dev.tdt.de>pull/22548/head
parent
ac9973bc11
commit
eb2ed20645
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=keepalived
|
||||
PKG_VERSION:=2.2.8
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.keepalived.org/software
|
||||
|
|
|
@ -105,6 +105,11 @@ globals() {
|
|||
printf '%benable_script_security\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
printf '%bprocess_names\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
|
||||
printf '%bstartup_script "/bin/busybox env -i ACTION=startup /sbin/hotplug-call keepalived"\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
printf '%bstartup_script_timeout 10\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
printf '%bshutdown_script "/bin/busybox env -i ACTION=shutdown /sbin/hotplug-call keepalived"\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
printf '%bshutdown_script_timeout 10\n' "${INDENT_1}" >> "$KEEPALIVED_CONF"
|
||||
|
||||
config_get notification_email "$1" notification_email
|
||||
print_list_indent notification_email
|
||||
|
||||
|
|
Loading…
Reference in New Issue