X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=bin%2Fmo-create-contestants;h=3cc44454b8cc8d937756d948c29c336d8c94a827;hb=e42d87511230ff3bd287367a43564a95d0340079;hp=bd56fd123169a9a530486d312e42a8b2e15ea9fa;hpb=3bebe650c10dcae0926aef74bb5ccb95c6c4e409;p=eval.git diff --git a/bin/mo-create-contestants b/bin/mo-create-contestants index bd56fd1..3cc4445 100755 --- a/bin/mo-create-contestants +++ b/bin/mo-create-contestants @@ -10,12 +10,22 @@ rm -rf users mkdir users cd users -for a in `awk = '$CT_UID_MIN' && $3 <= '$CT_UID_MAX') print $1; }'` ; do +for a in `cd $H && bin/mo-get-users` ; do echo "Creating $a" mkdir $a $a/$a chown root.$a $a chmod 750 $a - cp -a `find $H/template -type f` $a/$a/ + cp -a `find $H/template -mindepth 1 -maxdepth 1` $a/$a/ + + if [ -n "$REMOTE_SUBMIT" ] ; then + M=$a/$a/.mo + mkdir $M + cp $H/certs/$a-cert.pem $M/cert.pem + cp $H/certs/$a-key.pem $M/key.pem + chmod 600 $M/key.pem + cp $H/certs/ca-cert.pem $M/ + fi + chown $a.$a $a/$a -R chmod 700 $a/$a done