]> mj.ucw.cz Git - moe.git/blob - mop/admin/mo-push-certs.sh
Clean up backup, grab and push scripts.
[moe.git] / mop / admin / mo-push-certs.sh
1 #!/bin/bash
2 # Copy submit certificates to contestants' machines. Each machine gets
3 # only the certs of the contestants who should use it.
4
5 [ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
6 set -e
7 . cf/mop
8
9 while IFS="     " read LOGIN FULL MACH ; do
10         if [ -z "$1" -o "$1" == "$LOGIN" ] ; then
11                 echo "$LOGIN -> $MACH"
12                 D=$MO_ROOT/users/$LOGIN/$LOGIN/
13                 rsync -av $D/.mo root@$MACH:$D/
14         fi </dev/null
15 done <$CT_USER_LIST