chiark
/
gitweb
/
~mdw
/
mirror-admin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
44295de
)
bin/run-mirrors: Use id(1) to find current user name.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 21 Jul 2011 15:22:08 +0000 (16:22 +0100)
committer
Mark 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
patch
|
blob
|
blame
|
history
diff --git
a/bin/run-mirrors
b/bin/run-mirrors
index
ec43009
..
c69b903
100755
(executable)
--- 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