X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=mop%2Fadmin%2Fmo-push-certs.sh;h=55a3fd3730ab221032c580b6bf77c0f726558584;hb=d0add2889335d69d4bb17e8fd962e53dcee207bc;hp=54b84ba671e0c7abf8118cd857260bebfeae863e;hpb=fc833e30d9b1315ffdeb780d5257e8e1bdafad43;p=moe.git diff --git a/mop/admin/mo-push-certs.sh b/mop/admin/mo-push-certs.sh index 54b84ba..55a3fd3 100755 --- a/mop/admin/mo-push-certs.sh +++ b/mop/admin/mo-push-certs.sh @@ -1,12 +1,15 @@ #!/bin/bash -[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; } +# Copy submit certificates to contestants' machines. Each machine gets +# only the certs of the contestants who should use it. + +[ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; } set -e -. config +. cf/mop while IFS=" " read LOGIN FULL MACH ; do if [ -z "$1" -o "$1" == "$LOGIN" ] ; then echo "$LOGIN -> $MACH" - D=/mo/users/$LOGIN/$LOGIN/ + D=$MO_ROOT/users/$LOGIN/$LOGIN/ rsync -av $D/.mo root@$MACH:$D/ fi