sync-proxy-configs.sh.j2 741 B

12345678910111213141516
  1. #!/bin/bash
  2. VOL_DIR=/var/lib/docker/volumes/proxy
  3. SSH_CMD="ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null"
  4. mkdir -p ${VOL_DIR}/etc/haproxy/
  5. rsync -e "${SSH_CMD}" -va --progress root@proxy1.{{ oo_env }}.rhcloud.com:/etc/haproxy/ ${VOL_DIR}/etc/haproxy/
  6. mkdir -p ${VOL_DIR}/etc/httpd/
  7. rsync -e "${SSH_CMD}" -va --progress root@proxy1.{{ oo_env }}.rhcloud.com:/etc/httpd/ ${VOL_DIR}/etc/httpd/
  8. mkdir -p ${VOL_DIR}/etc/pki/tls/
  9. rsync -e "${SSH_CMD}" -va --progress root@proxy1.{{ oo_env }}.rhcloud.com:/etc/pki/tls/ ${VOL_DIR}/etc/pki/tls/
  10. # We need to disable the haproxy chroot
  11. sed -i -re 's/^(\s+)chroot/\1#chroot/' /var/lib/docker/volumes/proxy/etc/haproxy/haproxy.cfg