From 05e8e501f5d7557453fdb0fa24f3545b25545594 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 20 Dec 2023 13:48:26 +0100 Subject: [PATCH] feat(nextcloud): Restart nextcloud at activation time --- machines/compute01/nextcloud.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/machines/compute01/nextcloud.nix b/machines/compute01/nextcloud.nix index 84a0971..176985c 100644 --- a/machines/compute01/nextcloud.nix +++ b/machines/compute01/nextcloud.nix @@ -191,4 +191,12 @@ in { networking.hosts = { "129.199.146.148" = [ "s3.dgnum.eu" ]; }; dgn-secrets.matches."^nextcloud-.*$" = { owner = "nextcloud"; }; + + system.activationScripts = { + restart-nextcloud.text = '' + if [ "$(${pkgs.systemd}/bin/systemctl is-active phpfpm-nextcloud)" == "active" ]; then + ${pkgs.systemd}/bin/systemctl restart phpfpm-nextcloud + fi + ''; + }; }