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

Implemented "--unattended" option (Issue #223) #224

Merged
merged 18 commits into from
Apr 5, 2017
Merged

Conversation

EWouters
Copy link
Contributor

@EWouters EWouters commented Mar 13, 2017

I ported the functionality from the pi-hole script to fix #223 (#86). I finished implementing it but more people should try it before merging.

  • Parameters will be stored in /etc/pivpn/setupVars.conf
  • added a finalExports function
  • added an update_dialogs function to ask what to do if a parameter file was found
  • added an updatePiVPN function

Moved some stuff around.

This request is ready for testing.

confNetwork
confOVPN

# ?? Is this always OK? Also if you only select one DNS server ??
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this always OK? Also if you only select one DNS server, i.e. OVPNDNS2 is empty?

}


# I suggest replacing some of these names.
Copy link
Contributor Author

@EWouters EWouters Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest replacing some of these names. It looks cleaner in the parameter file.

echo "pivpnUser=${pivpnUser}"
echo "UNATTUPG=${UNATTUPG}"
echo "pivpnInterface=${pivpnInterface}"
echo "IPv4dns=${IPv4dns}"
Copy link
Contributor Author

@EWouters EWouters Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we save IPv4dns? Or is it fine to just detect it?

@EWouters
Copy link
Contributor Author

Is there a way to update without generating new keys? I read the wiki about just not updating, but it might be a good time to add this now.

EWouters added 7 commits March 14, 2017 14:26
fixed a typo
replaced tabs with spaces
I am not sure why this statement does not work with -e. We can also
remove the set -e statement altogether.
::: Create a client ovpn profile, optional nopass
:::
::: Usage: pivpn <-a|add> [-n|--name <arg>] [-p|--password
<arg>]|[nopass] [-h|--help]
:::
::: Commands:
:::  nopass               Create a client without a password
:::  -n,--name            Name for the Client (default: 'raspberrypi')
:::  -p,--password        Password for the Client (no default)
:::  -h,--help            Show this help dialog
::: Revoke a client ovpn profile
:::
::: Usage: pivpn <-r|revoke> [-h|--help] [<client-1>] ... [<client-n>]
...
:::
::: Commands:
:::  [none]               Interactive mode
:::  <client>             Client(s) to to revoke
:::  -h,--help            Show this help dialog
because it is hardcoded as "server" in other scripts
@EWouters
Copy link
Contributor Author

I also added command line options for the pivpn add and pivpn revoke functions. Now I can fully automate the setup and send myself an email with the certificate when everything is installed. :)

As described in pivpn#165 ( fc14664) it is not desirable.
@EWouters
Copy link
Contributor Author

Can anyone help me updating the bash-completion file?

@0-kaladin
Copy link
Member

@EWouters man I just saw this now. been really swamped. Let me review and give you some comments but thanks a ton for this.

@0-kaladin
Copy link
Member

@EWouters this is looking good so far. I've only looked at it online. Will test on real devices to see if it broke anything somewhere. But looks good reading it, awesome job.

Copy link
Member

@0-kaladin 0-kaladin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looking good. will merge into test so I can do more live testing.

@0-kaladin 0-kaladin merged commit c907a4b into pivpn:test Apr 5, 2017
@EWouters
Copy link
Contributor Author

EWouters commented Apr 7, 2017

Great, I'm happy to make any improvements you might suggest. There are also still a few comments in the code where I wasn't sure what was the best approach.

@jellemdekker jellemdekker mentioned this pull request Jul 9, 2017
@troyfontaine
Copy link

Any word on this PR? Movement seems to have stalled?

@EWouters
Copy link
Contributor Author

EWouters commented Jul 5, 2018

Hi @troyfontaine ,

The code was tested and merged into the master, and most of the suggestions and things I was not sure about have since been fixed or became obsolete. Only a few things (like the bash-completion file and the comment on this line) remain to be fixed/checked, but I don't know how to do that.

Are you referring to anything specific? And have you tried the --unattended option?

Anyway it might be a good idea to check if there were any substantial improvements in the pi-hole installer since this rewrite. I basically ported all the things they did there to this installer.

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.

None yet

4 participants