lambdabot: add named pipe for incoming commands

This commit is contained in:
Nikolay Amiantov 2015-04-20 16:51:14 +03:00
parent 91f3912b5d
commit 0f5d5f9d12

View File

@ -52,9 +52,18 @@ in
script = '' script = ''
mkdir -p ~/.lambdabot mkdir -p ~/.lambdabot
cd ~/.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 = { users.extraUsers.lambdabot = {