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

Remove unnecessary echo for duplicated entry #1552

Merged
merged 1 commit into from
Oct 7, 2018
Merged

Remove unnecessary echo for duplicated entry #1552

merged 1 commit into from
Oct 7, 2018

Conversation

iasdeoupxe
Copy link
Contributor

This logging for duplicated entries is already covered by an echo some lines below for the "add" case:

echo "IP ${IP} already exists on host.deny..." >> ${PWD}/../logs/active-responses.log

Keeping this echo will cause a log entry for the "delete" case which is completely unnecessary because it is clear that an entry already exists in the hosts.deny.

Also moved the check for duplicated entries after the IP syntax verification as we only need to check for duplicated entries if we have verified that we really got an IP.

Furthermore replaced the tabs with spaces and stripped down the comment.

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.

2 participants