mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Minor review comments
This commit is contained in:
parent
4d31d5ee11
commit
9b4f6c84cd
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ addOrEditKeyValPair() {
|
||||||
local value="${3}"
|
local value="${3}"
|
||||||
|
|
||||||
if [ "${value}" != "" ]; then
|
if [ "${value}" != "" ]; then
|
||||||
# value has a value, so it is a key pair
|
# value has a value, so it is a key-value pair
|
||||||
if grep -q "^${key}=" "${file}"; then
|
if grep -q "^${key}=" "${file}"; then
|
||||||
# Key already exists in file, modify the value
|
# Key already exists in file, modify the value
|
||||||
sed -i "/^${key}=/c\\${key}=${value}" "${file}"
|
sed -i "/^${key}=/c\\${key}=${value}" "${file}"
|
||||||
|
@ -52,7 +52,7 @@ addOrEditKeyValPair() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Takes two arguments key, and file.
|
# Takes two arguments file, and key.
|
||||||
# Deletes a key from target file
|
# Deletes a key from target file
|
||||||
#
|
#
|
||||||
# Example usage:
|
# Example usage:
|
||||||
|
|
Loading…
Reference in a new issue