Skip to content

Commit

Permalink
Merge pull request #7 from stablestud/restore-revert
Browse files Browse the repository at this point in the history
POSIX compliant, Revert to previous hosts file
  • Loading branch information
stablestud committed Mar 7, 2018
2 parents 1ece427 + 8dbef16 commit 5d5c287
Show file tree
Hide file tree
Showing 18 changed files with 832 additions and 604 deletions.
65 changes: 38 additions & 27 deletions adsorber.conf
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
## Config file for Adsorber v0.2.3
## Config file for Adsorber v0.3.0
#
# To reset the config file just delete it and run 'adsorber.sh install', a new
# config file will be created.
Expand All @@ -8,7 +7,7 @@
# Don't hesitate to create issues and pull-requests.


## PRIMARY_LIST
## primary_list
# Defines what list (either whitelist or blacklist) has the priority.
#
# For example: if 'blacklist' is set, the blacklist will overwrite
Expand All @@ -18,26 +17,26 @@
# Possible values: whitelist, blacklist
# Default value: blacklist

PRIMARY_LIST=blacklist
primary_list=blacklist


## USE_PARTIAL_MATCHING
## use_partial_matching
# Defines whether the WHITELIST includes sub-domains or not.
#
# For example: You white listed the domain wholesome-ads.com, if the value
# is set to 'true' all it's sub-domains like annoying.wholesome-ads.com will be
# also allowed. To disable this set the value to 'false'.
#
# Note: if you set PRIMARY_LIST to blacklist you still can block it's
# Note: if you set primary_list to blacklist you still can block it's
# specific sub-domains or top-level domain in the blacklist.
#
# Possible values: true, false
# Default value: true

USE_PARTIAL_MATCHING=true
use_partial_matching=true


## IGNORE_DOWNLOAD_ERROR
## ignore_download_error
# If set to false, we'll only apply the hosts file if all hosts sources
# could be reached.
#
Expand All @@ -48,40 +47,52 @@ USE_PARTIAL_MATCHING=true
# Possible values: true, false
# Default value: true

IGNORE_DOWNLOAD_ERROR=true
ignore_download_error=true


## HTTP_PROXY, HTTPS_PROXY ##
## http_proxy, https_proxy ##
# Specify what proxy server should be used when fetching the host domains.
# This will set or overwrite the environment variables of
# 'http_proxy' and 'https_proxy'.
#
# Possible value: address:port (e.g proxy:8080, 127.0.0.1:9050)
# Default value: Null (not set)

HTTP_PROXY=
HTTPS_PROXY=
http_proxy=
https_proxy=

## HOSTS_FILE_PATH
# HOSTS_FILE_PATH is used to set the path to the systems hosts file.
## hosts_file_path
# hosts_file_pat is used to set the path to the systems hosts file.
# Change if your system uses an other file or path.
#
# Default value: /etc/hosts

HOSTS_FILE_PATH=/etc/hosts
hosts_file_path=/etc/hosts


## HOSTS_FILE_BACKUP_PATH ##
# HOSTS_FILE_BACKUP_PATH is used to set the filename and the path to the
## hosts_file_backup_path ##
# hosts_file_backup_path is used to set the filename and the path to the
# backup of the hosts file to be created by Adsorber in the install process.
# To simply create a new backup run 'adsorber.sh install'
#
# Default value: /etc/hosts.original

HOSTS_FILE_BACKUP_PATH=/etc/hosts.original
hosts_file_backup_path=/etc/hosts.original


## CRONTAB_DIR_PATH
## hosts_file_previous_enable, hosts_file_previous_path ##
# Info goes here
#
# Possible values for 'hosts_file_previous_enable': true, false
# Default value for 'hosts_file_previous_enable': true
#
# Default value for 'hosts_file_previous_path': /etc/hosts.previous

hosts_file_previous_enable=true
hosts_file_previous_path=/etc/hosts.previous


## crontab_dir_path
# This defines the directory in which we'll set the crontab.
# Used to create a scheduler which supplies the hosts file regulary with
# new ad-domains.
Expand All @@ -90,25 +101,25 @@ HOSTS_FILE_BACKUP_PATH=/etc/hosts.original
# with setting another directory, for example /etc/cron/daily to update the
# hosts file daily.
#
# Possible value: /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly,
# /etc/cron.monthly, or any other directory which it's contents will be
# Possible value: /etc/cron.hourly/, /etc/cron.daily/, /etc/cron.weekly/,
# /etc/cron.monthly/, or any other directory which it's contents will be
# executed as a script regulary.
#
# Default value: /etc/cron.weekly
# Default value: /etc/cron.weekly/

CRONTAB_DIR_PATH=/etc/cron.weekly
crontab_dir_path=/etc/cron.weekly/


## SYSTEMD_DIR_PATH
## systemd_dir_path
# This defines the directory in which we'll place the systemd files.
# Used to create a scheduler which supplies the hosts file regulary with
# new ad-domains. Change if your system has an other path.
#
# In the default setting it'll update once a week. To change this behavior you
# need to change adsorber.timer's 'OnCalendar' setting to another period.
# The file can be found at SYSTEMD_DIR_PATH, to change it before placement go
# The file can be found at systemd_dir_path, to change it before placement go
# into the scripts root directory and edit bin/systemd/adsorber.timer
#
# Default value: /etc/systemd/system
# Default value: /etc/systemd/system/

SYSTEMD_DIR_PATH=/etc/systemd/system
systemd_dir_path=/etc/systemd/system/
Loading

0 comments on commit 5d5c287

Please sign in to comment.