diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-09-30 19:40:57 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-09-30 19:40:57 +0200 |
commit | aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401 (patch) | |
tree | efb1b33a3b0986f71ccde4db7fd83e646c9a607b | |
parent | d255f50559b881aeaba6b1bee5b79da86ab0f7c8 (diff) | |
download | nixos-aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401.tar nixos-aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401.tar.gz nixos-aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401.tar.bz2 nixos-aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401.tar.xz nixos-aeed9f37d6ef9c74ded6ca56bccb99e6f35a4401.zip |
log recv-media
-rw-r--r-- | hel/recv-media.nix | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ | |||
3 | writeScriptBin "recv-media" '' | 3 | writeScriptBin "recv-media" '' |
4 | #!${stdenv.shell} | 4 | #!${stdenv.shell} |
5 | 5 | ||
6 | pid=$? | ||
7 | |||
8 | exec 1> >(${pkgs.util-linux}/bin/logger --id=$pid -t recv-media -p user.notice) | ||
9 | exec 2> >(${pkgs.util-linux}/bin/logger --id=$pid -t recv-media -p user.error) | ||
10 | |||
6 | [[ -z "$1" || -z "$2" ]] && exit 2 | 11 | [[ -z "$1" || -z "$2" ]] && exit 2 |
7 | 12 | ||
8 | PATH=${coreutils}/bin | 13 | PATH=${coreutils}/bin |
@@ -10,6 +15,6 @@ writeScriptBin "recv-media" '' | |||
10 | dir=/var/media | 15 | dir=/var/media |
11 | target="''${dir}"/$(basename "$1") | 16 | target="''${dir}"/$(basename "$1") |
12 | 17 | ||
13 | cp -ln "$1" "''${target}" | 18 | cp -lvn "$1" "''${target}" |
14 | touch -c -m -t "$2" "''${target}" | 19 | touch -c -m -t "$2" "''${target}" |
15 | '' | 20 | '' |