From d3df4cba29788a3b5520064415e34d9cd1e34277 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 27 Apr 2016 12:44:17 +0200 Subject: setup logfiles on startup --- custom/uucp.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/custom/uucp.nix b/custom/uucp.nix index a656596c..a47e0157 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -118,6 +118,18 @@ in { ln -fs ${builtins.toFile "ssh-config" config.services.uucp.sshConfig} ${config.users.users."uucp".home}/.ssh/config ''; + system.activationScripts."uucp-logs" = '' + touch ${config.services.uucp.logFile} + chown ${config.users.users."uucp".name}:${config.users.users."uucp".group} ${config.services.uucp.logFile} + chmod 644 ${config.services.uucp.logFile} + touch ${config.services.uucp.statFile} + chown ${config.users.users."uucp".name}:${config.users.users."uucp".group} ${config.services.uucp.statFile} + chmod 644 ${config.services.uucp.statFile} + touch ${config.services.uucp.debugFile} + chown ${config.users.users."uucp".name}:${config.users.users."uucp".group} ${config.services.uucp.debugFile} + chmod 644 ${config.services.uucp.debugFile} + ''; + environment.etc."uucp/port" = { text = concatStringsSep "\n" (map portSpec config.services.uucp.remoteNodes); }; -- cgit v1.2.3