scripts/wireguard/removeCONF.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
* Replaced LIST=($(...)) with mapfile
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
* SC2154: <VarName> is referenced but not assigned.
* Disabled warning
scripts/wireguard/pivpnDEBUG.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2154: <VarName> is referenced but not assigned.
* Disabled warning
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
scripts/wireguard/makeCONF.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2154: <VariableName> is referenced but not assigned.
* Disabled warning
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
scripts/wireguard/disableCONF.sh
* Mapfile instead of double quoted LIST=("$(...)")
scripts/wireguard/enableCONF.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
* Changed to mapfile
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
scripts/openvpn/removeOVPN.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2128: Expanding an array without an index only gives the first element.
* Disabled warning, as its only checking if variable is empty
* SC2001: See if you can use ${variable//search/replace} instead.
* Disabled warning, regex doesn't apply to ${variable//search/replace}
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
* SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
* Removed unecessary double quotes from %s
* SC2154: <VariableName> is referenced but not assigned.
* Disabled warning, variables sourced externally
scripts/openvpn/pivpnDebug.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning message
* SC2154: <VariableName> is referenced but not assigned.
* Disabled warning message
* SC2086: Double quote to prevent globbing and word splitting.
* Added double quotes
* SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
* Added double quotes
scripts/openvpn/makeOVPN.sh
* SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* Disabled warning
* SC2086: Double quote to prevent globbing and word splitting.
* Added missing double quotes
* SC2001: See if you can use ${variable//search/replace} instead.
* Disabled warning, suggested method doesn't go well with regexp
* SC2154: <VarName> is referenced but not assigned.
* Disabled warning, variables are sourced externally and may differ
shellchek job not exiting with propper error code due to find -exec exit
code be always 0.
Piping find to xargs instead to get propper exit codes from shellcheck
scripts/uninstall.sh
* SC2154: <VarName> is referenced but not assigned.
* Disabled warnings for mentioned errors as they are sourced externaly and may vary
scripts/self_check.sh
* Fixes SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
* SC2154: <VarName> is referenced but not assigned.
* Disabled warnings for the mentioned errors as they are sourced externaly and may vary
* Introduction to Github discussions
* Added pivpn room at matrix.org
* Changed titles format from -- to ##
* (tried) to make readme a bit more clear in regards opening
issues and bug reports
debconf-apt-progress is a tool to show a whiptail based dialog with progress bar for apt package installs, but it is some downsides:
- It aborts whenever apt or debconf halt for an interactive input, hence this would need to be prevented carefully, e.g. via "DEBIAN_FRONTEND=noninteractive" and "--force-confdef/old/new/miss", while it is questionable whether PiVPN should mute such configuration inputs for users.
- It even aborts when such interactive input is not actually required in some cases, but triggered by some other debconf load internals: pivpn#1360
Most importantly, aside of the visually probably appealing progress bar, debconf-apt-progress has not any upsides but reduces transparency of what is actually done, and the installer has a fallback already.
This commit removes the debconf-apt-progress usage in favour of the fallback: direct apt-get usage.
Signed-off-by: MichaIng <micha@dietpi.com>
There is only a single wget call in the installer, at the beginning of a pipe where curl may be the more natural choice. Since curl is a dependency already, this commit replaces the only wget call with curl and hence removes wget from installer dependencies.
Additionally, all curl calls get additional flags:
-s: The "silent" flag is now consequently used to suppress all processing output. It is not necessarily required when the STDOUT is a pipe or command substitution, but it does not hurt.
-S: Even when the curl output is piped, it may be helpful to have errors visible via STDERR, for debugging and being transparent about actual connection/download errors. This flag preserves error messages but does not send them to STDOUT, hence the data processed in the pipe or command substitution is not affected.
-f: There are cases where webservers return a 40x HTML document which is then printed to STDOUT by curl, like a 20x document, and hence unintentionally processed by the end of the pipe or command substitution. Usually this just cases a syntax error, but in theory it can have any unintended or even dangerous effect. The "fail" flag assures that 40x responses are printed as shortened error messages to STDERR and nothing is output to STDOUT. It should be hence seen as mandatory flag whenever curl is called to not print something to console but the output is processed.
-L: wget follows redirects automatically, curl requires the "-L" flag for this. For the wget => curl migration it is hence added to not change the behaviour.
Signed-off-by: MichaIng <micha@dietpi.com>
Changed LatesteUpdate.md to CHANGELOG.md
README.md
* Added status page badge
* Changed websites links text and position
* Replaced banner with pivpn banner
rsyslog and/or logrotate may not be installed on the system, in which case creating the configurations may fail. As rsyslog and logrotate may be installed later on, it makes sense to pre-create those directories so that then OpenVPN logs are handled as expected.
Also, if the rsyslog service is not installed or not active, it should not and does not need to be restarted. Since there is not `-e` flag, ` || true` has not effect, but also, when using that flag it makes sense to exit if for some reason the running service couldn't be restarted, which may then be caused by the added configuration.
Signed-off-by: MichaIng <micha@dietpi.com>
- When NOT providing a custom MTU, 1420 is used for both clients and server.
Using such value for clients can break WireGuard connections on some networks,
so iOS and Android clients have logic in place to select a proper MTU value
when not specified. Now "pivpnMTU" with only be used to set the MTU value for
the PiVPN installation but not for profile creation.