Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow providing response file for running non-interactively #2

Merged
merged 1 commit into from
Jun 17, 2020
Merged

Conversation

hilverd
Copy link
Contributor

@hilverd hilverd commented Jun 12, 2020

This allows users to provide a config/response.txt file with the commands to be used for connecting and logging in. If that file is not present, start-vpn should work as before.

I had to apt-install gettext-base so that the envsubst command is available for replacing the string $VPN_PASSWORD in the response file with the value of that environment variable (which is set after prompting the user for their password).

If the Docker image already exists, start-vpn will now still make a call to docker build which should be quick if nothing has changed (and I've added -q as it seemed appropriate). This is because existing users will need to rebuild their image to get the changes to Dockerfile and entrypoint.sh.

I also added a small bug fix

chmod a+r /etc/resolv.conf

to fix a problem on my machine caused by config/resolv.template not being world-readable.

@danjpgriffin danjpgriffin merged commit 229d3fc into danjpgriffin:master Jun 17, 2020
@danjpgriffin
Copy link
Owner

Thanks Hilverd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants