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 Region option #16

Open
JasonMeudt opened this issue Feb 22, 2025 · 1 comment
Open

Allow Region option #16

JasonMeudt opened this issue Feb 22, 2025 · 1 comment

Comments

@JasonMeudt
Copy link

Can you add in the option to request a region/server via the case block?

	"-l"|"--location")
		shift
		LOC="$1"
		shift
		;;

and then in the if [ -n "$OPT_SHOWHELP" ] block, add:

echo " -l, --location <region> Specify the region/location for the WireGuard config"

@triffid
Copy link
Owner

triffid commented Feb 25, 2025

It would be overridden by the user config file unless it was put in a separate variable (eg LOC_CMDLINE or so) and pulled in after user config is read around line 113 (eg if [ -n "$LOC_CMDLINE" ]; then LOC="$LOC_CMDLINE"; echo "Location overridden by commandline to $LOC_CMDLINE"; fi or so).

I'd accept a pull req if you fix that, since the default user config includes a location and thus your edit as described would confusingly/silently not work 😉

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

No branches or pull requests

2 participants