Skip to content
Snippets Groups Projects
extend_start.sh 527 B
Newer Older
  • Learn to ignore specific revisions
  • 
    # Set datagram receiving queue length to 128 for haproxy's socket
    sysctl net.unix.max_dgram_qlen=128
    
    
    # We are intentionally not using exec so we can reload the haproxy config later
    
    Sam Yaple's avatar
    Sam Yaple committed
    echo "Running command: '${CMD}'"
    
    retry=0
    # The loop breaks only when haproxy.pid get missing even after 3 re-try.
    while [[ $retry -lt 3 ]]; do
        if [[ ! -e /run/haproxy.pid || ! -d /proc/$(cat /run/haproxy.pid) ]]; then
            retry=$((retry+1))
            sleep 2
            continue
        fi
        retry=0
    
    Sam Yaple's avatar
    Sam Yaple committed
    
    exit 1