"Fossies" - the Fresh Open Source Software Archive

Member "octavia-3.0.2/elements/haproxy-octavia/post-install.d/20-setup-haproxy-log" (19 Dec 2018, 285 Bytes) of package /linux/misc/openstack/octavia-3.0.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 set -eu
    4 set -o pipefail
    5 
    6 if [[ -d /etc/rsyslog.d ]] && [[ ! -e /etc/rsyslog.d/49-haproxy.conf ]]; then
    7     cat >> /etc/rsyslog.d/49-haproxy.conf <<EOF
    8 # Send HAProxy messages to a dedicated logfile
    9 if \$programname startswith 'haproxy' then /var/log/haproxy.log
   10 &~
   11 EOF
   12 fi