mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-11-22 07:05: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"
|
||||
# Remove temp file
|
||||
rm "$CONFIG$LIST.bak"
|
||||
rm "$CONFIG$LIST_DNSMASQ.bak"
|
||||
# Notify user
|
||||
echo "${COLOR_GREEN}Done!${COLOR_RESET}"
|
||||
echo "${COLOR_GREEN}List updated!${COLOR_RESET}"
|
||||
}
|
||||
|
||||
start() {
|
||||
update
|
||||
# Add List to host file
|
||||
cat "$CONFIG/$LIST" >> "$HOST_FILE"
|
||||
# Notify user
|
||||
@ -104,8 +106,8 @@ stop() {
|
||||
# Remove list to host file
|
||||
sed -i -n "/$START_TAG/,/$END_TAG/d" "$HOST_FILE"
|
||||
|
||||
# Remove temp file
|
||||
#rm "$HOST_FILE.bak"
|
||||
# Remove DNSMASQ
|
||||
rm -f $CONFIG/$LIST_DNSMASQ
|
||||
|
||||
# Notify user
|
||||
echo "${COLOR_GREEN}DISABLED!${COLOR_RESET}"
|
||||
|
Loading…
Reference in New Issue
Block a user