cp + rm === mv (well, almost)
This commit is contained in:
@@ -338,8 +338,7 @@ gravity_hostFormatGravity() {
|
|||||||
echo "" > "${piholeDir}/${accretionDisc}"
|
echo "" > "${piholeDir}/${accretionDisc}"
|
||||||
gravity_doHostFormat "${piholeDir}/${eventHorizon}" "${piholeDir}/${accretionDisc}"
|
gravity_doHostFormat "${piholeDir}/${eventHorizon}" "${piholeDir}/${accretionDisc}"
|
||||||
# Copy the file over as /etc/pihole/gravity.list so dnsmasq can use it
|
# Copy the file over as /etc/pihole/gravity.list so dnsmasq can use it
|
||||||
cp "${piholeDir}/${accretionDisc}" "${adList}"
|
mv "${piholeDir}/${accretionDisc}" "${adList}"
|
||||||
rm "${piholeDir}/${accretionDisc}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gravity_hostFormatBlack() {
|
gravity_hostFormatBlack() {
|
||||||
@@ -348,8 +347,7 @@ gravity_hostFormatBlack() {
|
|||||||
# Format domain list as "192.168.x.x domain.com"
|
# Format domain list as "192.168.x.x domain.com"
|
||||||
gravity_doHostFormat "${blacklistFile}" "${blackList}.tmp"
|
gravity_doHostFormat "${blacklistFile}" "${blackList}.tmp"
|
||||||
# Copy the file over as /etc/pihole/black.list so dnsmasq can use it
|
# Copy the file over as /etc/pihole/black.list so dnsmasq can use it
|
||||||
cp "${blackList}.tmp" "${blackList}"
|
mv "${blackList}.tmp" "${blackList}"
|
||||||
rm "${blackList}.tmp"
|
|
||||||
else
|
else
|
||||||
echo "::: Nothing to blacklist!"
|
echo "::: Nothing to blacklist!"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user