Merge ads.txt entries from trusted sources.
wgetorcurlto download external filesmktempto create temporary files- a cron daemon to schedule the sync periodically
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"Execute the bash script directly from command line:
$> ./adstxt-sync.bashEdit crontab:
$> crontab -eInstall the following crontab to execute every two hours:
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
0 */2 * * * /path/to/adstxt-sync.bash