]> mj.ucw.cz Git - moe.git/blobdiff - mop/admin/mo-push-certs.sh
Need to switch directory when reading configuration.
[moe.git] / mop / admin / mo-push-certs.sh
index 54b84ba671e0c7abf8118cd857260bebfeae863e..55a3fd3730ab221032c580b6bf77c0f726558584 100755 (executable)
@@ -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 </dev/null
-done <userlist
+done <$CT_USER_LIST