Add missing directory files

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This commit is contained in:
Petr "Stone" Hracek 2017-04-18 12:53:44 +02:00
commit 60373eb680
2 changed files with 29 additions and 0 deletions

15
files/docker-entrypoint.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- haproxy "$@"
fi
if [ "$1" = 'haproxy' ]; then
# if the user wants "haproxy", let's use "haproxy-systemd-wrapper" instead so we can have proper reloadability implemented by upstream
shift # "haproxy"
set -- "$(which haproxy-systemd-wrapper)" -p /run/haproxy.pid "$@"
fi
exec "$@"

14
files/haproxy.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
if [[ ! -z "${DEBUG_MODE}" ]]; then
rpm -q syslog-ng
if [[ $? -ne 0 ]]; then
dnf -y --setopt=tsflags=nodocs install syslog-ng && \
dnf -y clean all
syslog-ng
fi
fi
# Run haproxy binary
/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg