docker-entrypoint.sh 311 B

123456789101112131415
  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. fi
  8. if [ ${mode} == "client" ]
  9. then
  10. sed -i "s/remote server/remote ${server}/" /etc/openvpn/client.conf
  11. mv /etc/openvpn/client.conf /etc/openvpn/ovpn.conf
  12. fi
  13. exec "$@"