bin/run-mirrors: Use sudo to change user.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 16 Aug 2011 09:20:56 +0000 (10:20 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 16 Aug 2011 09:22:29 +0000 (10:22 +0100)
The mirror user's home is elsewhere on vampire, so userv doesn't work as
well.

bin/run-mirrors

index 1dc0a14..1dffeec 100755 (executable)
@@ -5,7 +5,7 @@ set -e
 ## Make sure we're running as the right user.
 case $(id -un) in
   mirror) ;;
-  *) exec userv -fstdin=/dev/null mirror run ;;
+  *) exec sudo -umirror "$0" "$@" ;;
 esac
 
 ## Set up a plausible environment.