From: Martin Mares Date: Wed, 12 Mar 2008 19:36:12 +0000 (+0100) Subject: Added a simple utility for pushing of submit certificates to machines. X-Git-Tag: python-dummy-working~224 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=cc023a489508426369337dea3428d985a7f22d89;p=moe.git Added a simple utility for pushing of submit certificates to machines. --- diff --git a/bin/mo-push-certs b/bin/mo-push-certs new file mode 100755 index 0000000..54b84ba --- /dev/null +++ b/bin/mo-push-certs @@ -0,0 +1,12 @@ +#!/bin/bash +[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; } +set -e +. config + +while IFS=" " read LOGIN FULL MACH ; do + if [ -z "$1" -o "$1" == "$LOGIN" ] ; then + echo "$LOGIN -> $MACH" + D=/mo/users/$LOGIN/$LOGIN/ + rsync -av $D/.mo root@$MACH:$D/ + fi