X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmo-create-contestants;h=3cc44454b8cc8d937756d948c29c336d8c94a827;hb=eff3e813ec7d6c246dfadea41432fd68ec2e86fd;hp=28f6415889c73a79a0fabbe69452a3e53dd5ff68;hpb=8784ed78c5f8e37469eddc00fee49d70ae80afbb;p=moe.git diff --git a/bin/mo-create-contestants b/bin/mo-create-contestants index 28f6415..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 -name ".*"` $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