bin/run-mirrors: Use id(1) to find current user name.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 21 Jul 2011 15:22:08 +0000 (16:22 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 21 Jul 2011 15:46:47 +0000 (16:46 +0100)
USER isn't set by sudo(8) -- at least in my configuration.

bin/run-mirrors

index ec43009..c69b903 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 ## Make sure we're running as the right user.
-case "$USER" in
+case $(id -un) in
   mirror) ;;
   *) exec userv -fstdin=/dev/null mirror run ;;
 esac