From 2ed6a854ed0b69b743bacf50950d0e01cef1f80b Mon Sep 17 00:00:00 2001
From: lassulus <lass@lassul.us>
Date: Sat, 25 Mar 2017 22:49:50 +0100
Subject: l 2 websites domsen: add phpfpm restarter

---
 lass/2configs/websites/domsen.nix | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

(limited to 'lass/2configs/websites')

diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index fde3f7c2b..684742512 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -21,6 +21,22 @@ let
     exec ${pkgs.msmtp}/bin/msmtp --read-envelope-from -C ${msmtprc} "$@"
   '';
 
+  restartPhpfpm_o.ubikmedia = pkgs.writeDash "restartPhpfpm_o.ubikmedia.org" ''
+    ${pkgs.systemd}/bin/systemctl restart phpfpm-o.ubikmedia.de.service
+  '';
+
+  restartPhpfpm_o.ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_o.ubikmedia" ''
+    /run/wrappers/bin/sudo ${restartPhpfpm_o.ubikmedia}
+  '';
+
+  restartPhpfpm_ubikmedia = pkgs.writeDash "restartPhpfpm_ubikmedia.org" ''
+    ${pkgs.systemd}/bin/systemctl restart phpfpm-ubikmedia.de.service
+  '';
+
+  restartPhpfpm_ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_ubikmedia" ''
+    /run/wrappers/bin/sudo ${restartPhpfpm_ubikmedia}
+  '';
+
 in {
   imports = [
     ./sqlBackup.nix
@@ -162,5 +178,17 @@ in {
     useDefaultShell = true;
     createHome = true;
   };
+
+  #sudo restart wrappers
+  security.sudo.extraConfig = ''
+    domsen ALL= (root) NOPASSWD: ${restartPhpfpm_o.ubikmedia}
+    domsen ALL= (root) NOPASSWD: ${restartPhpfpm_ubikmedia}
+  '';
+
+  krebs.per-user.domsen.packages = [
+    restartPhpfpm_ubikmedia_wrapper
+    restartPhpfpm_o.ubikmedia_wrapper
+  ];
+
 }
 
-- 
cgit v1.2.3


From c898a59d533499f7c4404bd31eb3ad6cf554819b Mon Sep 17 00:00:00 2001
From: lassulus <lass@lassul.us>
Date: Tue, 11 Apr 2017 20:01:03 +0200
Subject: l 2 websites domsen: add testuser@ubikmedia.eu

---
 lass/2configs/websites/domsen.nix | 1 +
 1 file changed, 1 insertion(+)

(limited to 'lass/2configs/websites')

diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index 684742512..a5c51735a 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -132,6 +132,7 @@ in {
       { from = "ubik@ubikmedia.eu"; to = "domsen, jms, ms"; }
 
       { from = "testuser@lassul.us"; to = "testuser"; }
+      { from = "testuser@ubikmedia.eu"; to = "testuser"; }
     ];
     sender_domains = [
       "jla-trading.com"
-- 
cgit v1.2.3