adstxt-sync-bash
Merge ads.txt entries from trusted sources.
Requirements
wget
orcurl
to download external filesmktemp
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