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

Replace superseded netstat command #1676

Merged
merged 2 commits into from Aug 31, 2017

Conversation

Projects
None yet
3 participants
@WaLLy3K
Copy link
Collaborator

WaLLy3K commented Aug 31, 2017

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

9


  • Make colfile readonly, and use path of PI_HOLE_SCRIPT_DIR
  • Rename piholeStatus function to statusFunc for function name consistency
  • Replace superseded netstat command with nc
  • Perform addn-hosts check using a single grep subshell
Replace superseded netstat command
* Make colfile readonly, and use path of PI_HOLE_SCRIPT_DIR
* Rename piholeStatus function to statusFunc for function name consistency
* Replace superseded netstat command with nc
* Perform addn-hosts check using a single grep subshell
@dschaper
Copy link
Member

dschaper left a comment

Just a couple of style requests and a check on the availability of nc on various platforms.

pihole Outdated
local addnConfigs

# Determine if service is running on port 53
if nc -z 127.0.0.1 53; then

This comment has been minimized.

@dschaper

dschaper Aug 31, 2017

Member

if [[ nc -z 127.0.0.1 53 ]]; then

But I'm not sure if this is just goal post stuff, nc isn't stock on a lot of systems. Some have BSD netcat and some don't have anything installed at all. Will have to check a few systems to make sure this is available.

This comment has been minimized.

@WaLLy3K

WaLLy3K Aug 31, 2017

Author Collaborator

I'll be happy to sort the style issue out once there's more word on this. It'll also mean this code will need to be changed.

pihole Outdated

# Determine if service is running on port 53
if nc -z 127.0.0.1 53; then
[[ "${1}" != "web" ]] && echo -e " ${TICK} DNS service is running"

This comment has been minimized.

@dschaper

dschaper Aug 31, 2017

Member

Just for style this would be better in an if [[ ]]; then; else in either a multi line statement or if you want to keep it oneliner then in that format.

Replace nc with psuedo-device
* Also fix minor conditional style issue

Issues have been acknowledged and fixed.

@dschaper

This comment has been minimized.

Copy link
Member

dschaper commented Aug 31, 2017

Very nice, looks good.

Approved

Approved with PullApprove

@WaLLy3K WaLLy3K merged commit bf059e5 into development Aug 31, 2017

5 checks passed

codacy/pr Good work! A positive pull request.
Details
code-review/pullapprove Approved by dschaper, WaLLy3K
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@WaLLy3K WaLLy3K deleted the remove-netstat branch Aug 31, 2017

@Mcat12 Mcat12 referenced this pull request Sep 10, 2017

Closed

add net-tools to dependency list #1689

5 of 5 tasks complete
@pralor

This comment has been minimized.

Copy link

pralor commented Feb 27, 2018

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-v3-2-introduces-long-term-statistics-an-audit-log-colours-and-more/5772/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.