summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-03-25 22:49:50 +0100
committerlassulus <lass@lassul.us>2017-03-25 22:54:47 +0100
commit2ed6a854ed0b69b743bacf50950d0e01cef1f80b (patch)
treef7524e8032dec963ded496515721e83cf68e3f18
parent6e10766e9cf1eb070cee139e2cdec61bed186058 (diff)
l 2 websites domsen: add phpfpm restarter
-rw-r--r--lass/2configs/websites/domsen.nix28
1 files changed, 28 insertions, 0 deletions
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
+ ];
+
}