build01: replace cron with timer for healthcheck

This commit is contained in:
Jörg Thalheim 2021-03-06 07:52:04 +01:00
parent 652901560f
commit 904f3cfbc2
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4

View file

@ -44,11 +44,10 @@
'';
};
services.cron.enable = true;
services.cron.systemCronJobs = [
# record that this machine is alive
"*/5 * * * * root ${pkgs.curl}/bin/curl -X POST -sfL https://hc-ping.com/fcf6c029-5b57-44aa-b392-923f3d894dd9"
];
systemd.services.healthcheck-ping = {
startAt = "*:0/5"; # every 5 minutes
serviceConfig.ExecStart = "${pkgs.curl}/bin/curl -X POST -sfL https://hc-ping.com/fcf6c029-5b57-44aa-b392-923f3d894dd9";
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = [ "zfs" ];