From: Mark Wooding Date: Thu, 21 Jul 2011 15:22:08 +0000 (+0100) Subject: bin/run-mirrors: Use id(1) to find current user name. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mirror-admin/commitdiff_plain/fb775fef3dc038b9cef46288de939f2bda06dbfa bin/run-mirrors: Use id(1) to find current user name. USER isn't set by sudo(8) -- at least in my configuration. --- diff --git a/bin/run-mirrors b/bin/run-mirrors index ec43009..c69b903 100755 --- a/bin/run-mirrors +++ b/bin/run-mirrors @@ -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