summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel/recv-media.nix7
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 @@
3writeScriptBin "recv-media" '' 3writeScriptBin "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''