scrape: add scraper
This commit is contained in:
parent
6ec7667c0a
commit
745fe9471e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue