]> mj.ucw.cz Git - moe.git/commitdiff
Added a simple utility for pushing of submit certificates to machines.
authorMartin Mares <mj@ucw.cz>
Wed, 12 Mar 2008 19:36:12 +0000 (20:36 +0100)
committerMartin Mares <mj@ucw.cz>
Wed, 12 Mar 2008 19:36:12 +0000 (20:36 +0100)
bin/mo-push-certs [new file with mode: 0755]

diff --git a/bin/mo-push-certs b/bin/mo-push-certs
new file mode 100755 (executable)
index 0000000..54b84ba
--- /dev/null
@@ -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 </dev/null
+done <userlist