summary refs log tree commit diff
path: root/fleet
diff options
context:
space:
mode:
authorV <v@unfathomable.blue>2021-08-17 03:14:25 +0200
committerV <v@unfathomable.blue>2021-08-17 05:16:56 +0200
commit0e47f8ca3f437a41a565931ce71630bdfbaad363 (patch)
treeef5e3494749ac1c3b88afdcc48f8e3d82b28a72f /fleet
parent1c9978010c2616ec664d9febc14beb1625f5f903 (diff)
fleet/modules/public-inbox: add Requires/After of the corresponding socket to the httpd service
This ensures they can be restarted together correctly, as well as
ensuring the service has a socket available at all times.

Change-Id: Ifa06e217cc2209aea4bcf28ed054d74cbc091a99
Diffstat (limited to 'fleet')
-rw-r--r--fleet/modules/public-inbox.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/fleet/modules/public-inbox.nix b/fleet/modules/public-inbox.nix
index 5c69fba..82241af 100644
--- a/fleet/modules/public-inbox.nix
+++ b/fleet/modules/public-inbox.nix
@@ -126,7 +126,12 @@ in {
 
     systemd.services.public-inbox-httpd = {
       description = "public-inbox mailing-list archive (web server)";
+
+      requires = [ "public-inbox-httpd.socket" ];
+      after = [ "public-inbox-httpd.socket" ];
+
       inherit environment;
+
       serviceConfig = {
         ExecStart = "${pkgs.public-inbox}/bin/public-inbox-httpd";
         DynamicUser = true;