From: Mark Wooding Date: Tue, 16 Aug 2011 09:20:56 +0000 (+0100) Subject: bin/run-mirrors: Use sudo to change user. X-Git-Url: https://git.distorted.org.uk/~mdw/mirror-admin/commitdiff_plain/6a18cc832e681f57432137a5750efa4f7302b085 bin/run-mirrors: Use sudo to change user. The mirror user's home is elsewhere on vampire, so userv doesn't work as well. --- diff --git a/bin/run-mirrors b/bin/run-mirrors index 1dc0a14..1dffeec 100755 --- a/bin/run-mirrors +++ b/bin/run-mirrors @@ -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.