haproxy new-haproxy script

From elyograg, 7 Months ago, written in Plain Text, viewed 44 times.
URL https://paste.elyograg.org/view/7d9e75b3 Embed
Download Paste or View Raw
  1. #!/bin/sh
  2.  
  3. err() {
  4.   echo "E: $*" >>/dev/stderr
  5. }
  6.  
  7. if [ -d /opt/quictls/lib64 ]; then
  8.   QUICTLS_LIB=/opt/quictls/lib64
  9. else
  10.   QUICTLS_LIB=/opt/quictls/lib
  11. fi
  12.  
  13. DIR=`dirname $0`/$1
  14. if [ -e "$DIR" ]; then
  15.   if [ -d "$DIR" ]; then
  16.     cd $1
  17.     git pull --rebase
  18.     make clean &&
  19.     make -j4 TARGET=linux-glibc \
  20.       USE_PCRE2_JIT=1 \
  21.       USE_OPENSSL=1 \
  22.       USE_ZLIB=1 \
  23.       USE_SYSTEMD=1 \
  24.       CPU=native \
  25.       USE_QUIC=1 \
  26.       SSL_INC=/opt/quictls/include \
  27.       SSL_LIB=$QUICTLS_LIB \
  28.       LDFLAGS="-Wl,-rpath,$QUICTLS_LIB" \
  29.       DEBUG=" " \
  30.  
  31. # blank line above is intentional.
  32. #      DEBUG="-DDEBUG_H3 -DDEBUG_QPACK" \
  33.     RETVAL="$?"
  34.     if [ "$RETVAL" -eq 0 ]; then
  35.       make install
  36.       RETVAL="$?"
  37.       if [ "$RETVAL" -ne 0 ]; then
  38.         err Install failed\!
  39.       fi
  40.       make clean
  41.     else
  42.       err Build failed\! skipping install\!
  43.     fi
  44.   else
  45.     err location \($DIR\) is not a directory.
  46.   fi
  47. else
  48.   err location \($DIR\) does not exist.
  49. fi
  50.  

Reply to "haproxy new-haproxy script"

Here you can reply to the paste above