Project

General

Profile

Bug #9922

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

Added by Jim Pingle 12 days ago. Updated 12 days ago.

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

0%

Estimated time:
Affected Version:
All
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.

Also available in: Atom PDF