mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
keepalived: add support for directory sync
This commit adds support for folder synchronization. An example is in the 810-files file where it is explained how to synchronize all hotplug files of keepalived. Signed-off-by: Francesco Benini <francy.benini@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
8eecd2e5a0
commit
7c58cd667b
@@ -44,11 +44,10 @@ ha_sync_send() {
|
||||
config_get sync_list "$cfg" sync_list
|
||||
|
||||
for sync_file in $sync_list $(sysupgrade -l); do
|
||||
[ -f "$sync_file" ] && {
|
||||
dir="${sync_file%/*}"
|
||||
list_contains files_list "${sync_file}" || append files_list "${sync_file}"
|
||||
}
|
||||
[ -f "$sync_file" ] && dir="${sync_file%/*}"
|
||||
[ -d "$sync_file" ] && dir="${sync_file}"
|
||||
|
||||
list_contains files_list "${sync_file}" || append files_list "${sync_file}"
|
||||
list_contains dirs_list "${sync_dir}${dir}" || append dirs_list "${sync_dir}${dir}"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user