mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-11-22 15:15:41 +01:00
Add system for DNSMASQ
This commit is contained in:
parent
d76a64356c
commit
4bcd6e95e5
8
maza
8
maza
@ -89,11 +89,13 @@ update() {
|
|||||||
echo $END_TAG >> "$CONFIG/$LIST_DNSMASQ"
|
echo $END_TAG >> "$CONFIG/$LIST_DNSMASQ"
|
||||||
# Remove temp file
|
# Remove temp file
|
||||||
rm "$CONFIG$LIST.bak"
|
rm "$CONFIG$LIST.bak"
|
||||||
|
rm "$CONFIG$LIST_DNSMASQ.bak"
|
||||||
# Notify user
|
# Notify user
|
||||||
echo "${COLOR_GREEN}Done!${COLOR_RESET}"
|
echo "${COLOR_GREEN}List updated!${COLOR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
update
|
||||||
# Add List to host file
|
# Add List to host file
|
||||||
cat "$CONFIG/$LIST" >> "$HOST_FILE"
|
cat "$CONFIG/$LIST" >> "$HOST_FILE"
|
||||||
# Notify user
|
# Notify user
|
||||||
@ -104,8 +106,8 @@ stop() {
|
|||||||
# Remove list to host file
|
# Remove list to host file
|
||||||
sed -i -n "/$START_TAG/,/$END_TAG/d" "$HOST_FILE"
|
sed -i -n "/$START_TAG/,/$END_TAG/d" "$HOST_FILE"
|
||||||
|
|
||||||
# Remove temp file
|
# Remove DNSMASQ
|
||||||
#rm "$HOST_FILE.bak"
|
rm -f $CONFIG/$LIST_DNSMASQ
|
||||||
|
|
||||||
# Notify user
|
# Notify user
|
||||||
echo "${COLOR_GREEN}DISABLED!${COLOR_RESET}"
|
echo "${COLOR_GREEN}DISABLED!${COLOR_RESET}"
|
||||||
|
Loading…
Reference in New Issue
Block a user