Add system for DNSMASQ

This commit is contained in:
Andros Fenollosa 2020-01-04 08:38:33 +01:00
parent d76a64356c
commit 4bcd6e95e5

8
maza
View File

@ -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}"