scrape: add scraper

This commit is contained in:
Astro 2021-09-08 00:34:26 +02:00
parent 6ec7667c0a
commit 745fe9471e
1 changed files with 15 additions and 0 deletions

View File

@ -103,6 +103,16 @@ in {
Group = config.users.users.scrape.group;
};
};
scrape-kreuzchor-termine = {
script = ''
${scraperPkgs.kreuzchor-termine}/bin/kreuzchor-termine > /tmp/kreuzchor-termine.ics
mv /tmp/kreuzchor-termine.ics ${config.users.users.scrape.home}/
'';
serviceConfig = {
User = config.users.users.scrape.name;
Group = config.users.users.scrape.group;
};
};
} // builtins.listToAttrs
(map makeNodeScraper (builtins.attrNames freifunkNodes) ++
map makeLuftScraper luftqualitaetStations
@ -137,6 +147,11 @@ in {
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = "hourly";
};
scrape-kreuzchor-termine = {
partOf = [ "scrape-kreuzchor-termine.service" ];
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = "daily";
};
} // builtins.listToAttrs
(map makeNodeScraperTimer (builtins.attrNames freifunkNodes) ++
(map makeLuftScraperTimer luftqualitaetStations)