chiark
/
gitweb
/
~mdw
/
mirror-admin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (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 ec430099f5ed5b24794825f32365d2e3be1e5629..c69b903643150b3489a5377b5c210b025c09745e 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.
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
mirror) ;;
*) exec userv -fstdin=/dev/null mirror run ;;
esac