summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flora/configuration.nix2
-rw-r--r--flora/services/trainspotter.nix (renamed from flora/services/urlwatcher.nix)6
-rw-r--r--flora/services/trainspotter.scm (renamed from flora/services/urlwatcher.scm)10
3 files changed, 9 insertions, 9 deletions
diff --git a/flora/configuration.nix b/flora/configuration.nix
index aa0602b..51fee59 100644
--- a/flora/configuration.nix
+++ b/flora/configuration.nix
@@ -14,7 +14,7 @@
./services/blog.nix
./services/znc.nix
./services/mail.nix
- ./services/urlwatcher.nix
+ ./services/trainspotter.nix
];
# Use the GRUB 2 boot loader.
diff --git a/flora/services/urlwatcher.nix b/flora/services/trainspotter.nix
index 5b6d7bf..5b81f7e 100644
--- a/flora/services/urlwatcher.nix
+++ b/flora/services/trainspotter.nix
@@ -1,15 +1,15 @@
{ config, lib, pkgs, ... }:
{
- systemd.services.urlwatcher-ilztal = {
+ systemd.services.trainspotter = {
enable = true;
description = "script watching the ilztalbahn gtfs for changes";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig.Type = "simple";
- path = with pkgs; [ curl libzip system-sendmail ];
+ path = with pkgs; [ curl libzip mailutils ];
script = ''
- ${pkgs.gauche}/bin/gosh ${pkgs.copyPathToStore ./urlwatcher.scm}
+ ${pkgs.gauche}/bin/gosh ${pkgs.copyPathToStore ./trainspotter.scm}
'';
startAt = "daily";
};
diff --git a/flora/services/urlwatcher.scm b/flora/services/trainspotter.scm
index 0519903..860f0ab 100644
--- a/flora/services/urlwatcher.scm
+++ b/flora/services/trainspotter.scm
@@ -31,18 +31,18 @@
(process-output->string `(zipcmp ,oldfile ,newfile)))
"")])
(do-pipeline `((echo ,(format "
-From: urlwatcher@flora.stuebinm.eu
-Subject: Ilztalbahn GTFS Update
-Neuer hash: ~a
-Link: ~a
+Neuer hash ist ~a
+Link ist ~a
~a
(~a)
" newhash url diff pretty-date))
- (sendmail "stuebinm@disroot.org" "-t")))
+ (mail "-s" "Ilztalbahn GTFS Update"
+ "stuebinm@disroot.org"
+ "-a" "From: trainspotter@flora.stuebinm.eu")))
(sexp-list->file
cachefile
(list (list pretty-date newhash))