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

PADD v3.6.7 #204

Merged
merged 17 commits into from
Mar 25, 2022
Merged

PADD v3.6.7 #204

merged 17 commits into from
Mar 25, 2022

Conversation

yubiuser
Copy link
Member

No description provided.

subnut and others added 11 commits February 21, 2022 09:33
chdir to the directory padd.sh is stored in before executing the rest of
the script. Prevents the formation of PADD.pid and piHoleVersion files
everywhere.

Fixes #62
- Show the version as N/A (Not Available) instead of v-1
- Don't show out-of-date message in status message
Fixed issues that occur if WebAdmin not installed
For reference, see -
https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

The escape sequences for some terminals (e.g. rxvt-unicode) contain
semicolons in them. E.g.  `tput setaf 0` returns "�[38;5;0m"

Now, we set heatmap colors using these escape sequences, and we store
the heatmap in ./piHoleVersion without quoting it.  So, when we source
./piHoleVersion, bash interprets the semicolons as command-separators,
and shows a bunch of errors like these -

	piHoleVersion: line 4: 5: command not found
	piHoleVersion: line 4: 2m: command not found
	piHoleVersion: line 7: 5: command not found
	piHoleVersion: line 7: 1m: command not found
	piHoleVersion: line 10: 5: command not found
	piHoleVersion: line 10: 2m: command not found
	piHoleVersion: line 13: 5: command not found
	piHoleVersion: line 13: 2m: command not found
	piHoleVersion: line 15: 5: command not found
	piHoleVersion: line 15: 2m: command not found

for reference, these are the contents of line 4, 7, 10, 13 and 15 -

	core_version_heatmap=^[[38;5;2m
	web_version_heatmap=^[[38;5;1m
	ftl_version_heatmap=^[[38;5;2m
	padd_version_heatmap=^[[38;5;2m
	version_heatmap=^[[38;5;2m

So now, as suggested by @dschaper in [1], we use hardcoded ANSI escape
codes that are guaranteed to work with ISO 6429 compatible terminals.

[1]: #171 (comment),
Fix command-not-found messages on rxvt-unicode
Signed-off-by: Christian König <ckoenig@posteo.de>
thomasmerz and others added 6 commits March 20, 2022 17:00
…nings

- removed some 'referenced but not assigned' variables
- removed some 'appears unused variables
- disabled a single SC2059 because it appears to be a false positive
Co-authored-by: yubiuser <ckoenig@posteo.de>
Co-authored-by: yubiuser <ckoenig@posteo.de>
Co-authored-by: yubiuser <ckoenig@posteo.de>
Fix Issue 188 by enabling and fixing SC2034 and SC2154 shellcheck warnings
@yubiuser yubiuser merged commit 1c8392c into master Mar 25, 2022
@yubiuser yubiuser deleted the development branch March 25, 2022 08:01
@yubiuser yubiuser restored the development branch March 25, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants