mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-24 13:47:35 +00:00
Add _verify_write_permissions()
checks to block
and unblock
.
This commit is contained in:
parent
3237818607
commit
404ee19742
2
hosts
2
hosts
@ -756,6 +756,7 @@ Description:
|
||||
for IPv4 and both \`fe80::1%lo0\` and \`::1\` for IPv6.
|
||||
HEREDOC
|
||||
block() {
|
||||
_verify_write_permissions "$@"
|
||||
if [[ -z "${1}" ]]
|
||||
then
|
||||
${_ME} help block
|
||||
@ -1173,6 +1174,7 @@ Description:
|
||||
Unblock a given hostname by removing its entries from the hosts file.
|
||||
HEREDOC
|
||||
unblock() {
|
||||
_verify_write_permissions "$@"
|
||||
if [[ -z "${1}" ]]
|
||||
then
|
||||
${_ME} help unblock
|
||||
|
Loading…
Reference in New Issue
Block a user