From 0f5d5f9d124037d781e67bbfdef0577d9f92820a Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 20 Apr 2015 16:51:14 +0300 Subject: lambdabot: add named pipe for incoming commands --- nixos/modules/services/networking/lambdabot.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services/networking/lambdabot.nix') diff --git a/nixos/modules/services/networking/lambdabot.nix b/nixos/modules/services/networking/lambdabot.nix index 3230ef2be85..4ef7c7c9ab6 100644 --- a/nixos/modules/services/networking/lambdabot.nix +++ b/nixos/modules/services/networking/lambdabot.nix @@ -52,9 +52,18 @@ in script = '' mkdir -p ~/.lambdabot cd ~/.lambdabot - exec ${cfg.package}/bin/lambdabot -e 'rc ${rc}' + mkfifo /run/lambdabot/offline + ( + echo 'rc ${rc}' + while true; do + cat /run/lambdabot/offline + done + ) | ${cfg.package}/bin/lambdabot ''; - serviceConfig.User = "lambdabot"; + serviceConfig = { + User = "lambdabot"; + RuntimeDirectory = [ "lambdabot" ]; + }; }; users.extraUsers.lambdabot = { -- cgit 1.4.1