Skip to content

mairdumont-netletix/adstxt-sync-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adstxt-sync-bash

Merge ads.txt entries from trusted sources.

Requirements

  • wget or curl to download external files
  • mktemp to create temporary files
  • a cron daemon to schedule the sync periodically

Configuration

Edit SOURCES and ADSTXT in adstxt-sync.bash:

SOURCES=(
    "/path/to/ads-local.txt"
    "https://tag.md-nx.com/config/site/<siteid>/ads.txt"
)
ADSTXT="/path/to/ads.txt"

Manual Execution / Testing

Execute the bash script directly from command line:

$> ./adstxt-sync.bash

Cronjob Installation

Edit crontab:

$> crontab -e

Install the following crontab to execute every two hours:

# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
0 */2 * * * /path/to/adstxt-sync.bash

Releases

No releases published

Packages

No packages published

Languages