Project

General

Profile

Actions

Bug #9922

closed

haproxy_version does not use full path to haproxy, leads to errors when run during cron

Added by Jim Pingle over 4 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
haproxy
Target version:
-
Start date:
11/25/2019
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
Affected Architecture:
All

Description

When /etc/rc.filter_configure_sync is run from cron, it yields errors from haproxy. For example in this simulated run:

: env PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin /etc/rc.filter_configure_sync
sh: haproxy: not found
sh: haproxy: not found
sh: haproxy: not found
sh: haproxy: not found

The culprit is haproxy_version() which does not use the full path to haproxy:

        $haproxy_version = shell_exec("haproxy -v | head -n 1 | awk '{ print $3 }'");

To me, I have a fix pending.

Actions

Also available in: Atom PDF