X-Git-Url: https://git.distorted.org.uk/~mdw/mirror-admin/blobdiff_plain/db2c5b8bde79ab1d6bea9799a24e09c985e95452..93e6eb8e52be68830815017f504a8bbfd76187e5:/bin/run-mirrors diff --git a/bin/run-mirrors b/bin/run-mirrors index ec43009..9d637b8 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 @@ -19,6 +19,11 @@ case "${MIRROR_LOCKED-nil}" in nil) exec env MIRROR_LOCKED=t locking -f var/mirror.lock "$0" "$@" ;; esac +## Hack for mad Kerberized NFS. +if [ -r etc/krb5.keytab ]; then + kinit -k -t etc/krb5.keytab mirror +fi + ## Before we start, rotate the logs. (Doing things this way means that we ## can be sure we don't lose new logs, even if the log rotation goes ## completely mental.