From aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 30 Sep 2016 19:40:57 +0200 Subject: log recv-media --- hel/recv-media.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hel/recv-media.nix b/hel/recv-media.nix index 505c5df3..f5888f8d 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix @@ -3,6 +3,11 @@ writeScriptBin "recv-media" '' #!${stdenv.shell} + pid=$? + + exec 1> >(${pkgs.util-linux}/bin/logger --id=$pid -t recv-media -p user.notice) + exec 2> >(${pkgs.util-linux}/bin/logger --id=$pid -t recv-media -p user.error) + [[ -z "$1" || -z "$2" ]] && exit 2 PATH=${coreutils}/bin @@ -10,6 +15,6 @@ writeScriptBin "recv-media" '' dir=/var/media target="''${dir}"/$(basename "$1") - cp -ln "$1" "''${target}" + cp -lvn "$1" "''${target}" touch -c -m -t "$2" "''${target}" '' -- cgit v1.2.3