docker-entrypoint.sh 594 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. #set -e
  3. export RNG=PROGRAM
  4. if [ ${mode} == "server" ]
  5. then
  6. mv /etc/openvpn/server.conf /etc/openvpn/ovpn.conf
  7. echo -e "LegacySigningMDs md2 md5\nMinimumDHBits 512\n" >> /etc/pki/tls/legacy-settings
  8. fi
  9. if [ ${mode} == "client" ]
  10. then
  11. sed -i "s/remote server/remote ${server}/" /etc/openvpn/client.conf
  12. mv /etc/openvpn/client.conf /etc/openvpn/ovpn.conf
  13. echo -e "LegacySigningMDs md2 md5\nMinimumDHBits 512\n" >> /etc/pki/tls/legacy-settings
  14. fi
  15. if [ ${mode} == "keygen" ]
  16. then
  17. echo "$SSHKEY" > /tmp/keyfile
  18. chmod 0400 /tmp/keyfile
  19. fi
  20. exec "$@"