diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-08-25 15:05:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-25 15:05:15 +0300 |
| commit | d2b54b9d01aee583a80a0cd48a790843d8c85b76 (patch) | |
| tree | 950735d90d769ef4a8efd05762579919bde635e0 /src | |
| parent | d4a14ce67f83062871783045c4ce98f2214888ba (diff) | |
| parent | cb7f10c438cfa0f8cac77988588252ca0954d564 (diff) | |
| download | vyos-1x-d2b54b9d01aee583a80a0cd48a790843d8c85b76.tar.gz vyos-1x-d2b54b9d01aee583a80a0cd48a790843d8c85b76.zip | |
Merge pull request #5399 from jeleel-muibi/t9145-wlb-health-script-env
wan-load-balance: T9145: add health script interface env
Diffstat (limited to 'src')
| -rwxr-xr-x | src/helpers/vyos-load-balancer.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/helpers/vyos-load-balancer.py b/src/helpers/vyos-load-balancer.py index 127ce05e5..04a2349bf 100755 --- a/src/helpers/vyos-load-balancer.py +++ b/src/helpers/vyos-load-balancer.py @@ -72,7 +72,14 @@ def health_check(ifname, conf, state, test_defaults): return False elif check_type == 'user-defined': script = test_conf['test_script'] - rc = run(script) + env = os.environ.copy() + env.update( + { + 'WLB_INTERFACE_NAME': ifname, + 'WLB_SCRIPT_IFACE': ifname, + } + ) + rc = run(script, env=env) if rc != 0: return False |
