From: Martin Mares Date: Wed, 20 Mar 2002 11:54:57 +0000 (+0000) Subject: Updated installation scripts. X-Git-Tag: python-dummy-working~493 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=3bebe650c10dcae0926aef74bb5ccb95c6c4e409;p=moe.git Updated installation scripts. --- diff --git a/bin/mo-create-contestants b/bin/mo-create-contestants new file mode 100755 index 0000000..bd56fd1 --- /dev/null +++ b/bin/mo-create-contestants @@ -0,0 +1,21 @@ +#!/bin/bash + +[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; } +set -e +. config + +H=`pwd` +cd $MO_ROOT +rm -rf users +mkdir users +cd users + +for a in `awk = '$CT_UID_MIN' && $3 <= '$CT_UID_MAX') print $1; }'` ; do + echo "Creating $a" + mkdir $a $a/$a + chown root.$a $a + chmod 750 $a + cp -a `find $H/template -type f` $a/$a/ + chown $a.$a $a/$a -R + chmod 700 $a/$a +done diff --git a/bin/mo-create-testusers b/bin/mo-create-testusers index 1652298..0ff2c8c 100755 --- a/bin/mo-create-testusers +++ b/bin/mo-create-testusers @@ -6,7 +6,7 @@ set -e make H=`pwd` -cd $MO_ROOT +cd $MO_ROOT/eval # mo-test home for u in $TEST_USERS ; do diff --git a/bin/mo-install b/bin/mo-install index 982987f..966c3fd 100755 --- a/bin/mo-install +++ b/bin/mo-install @@ -6,11 +6,15 @@ set -e make H=`pwd` -cd $MO_ROOT # mo-eval home +cd $MO_ROOT +rm -rf eval +mkdir eval +chgrp $EVAL_GROUP eval +chmod 550 eval +cd eval echo "Creating $EVAL_USER" -rm -rf ./$EVAL_USER mkdir $EVAL_USER cd $EVAL_USER cp -a $H/* . @@ -23,6 +27,7 @@ chmod 700 $EVAL_USER ( cd $EVAL_USER ; bin/mo-create-testusers ) # common +cd $MO_ROOT echo "Creating public" rm -rf public mkdir public