devi@40: ###install devi@65: $lmssh $ssh_user@$host /bin/sh -c '"mkdir -p ~/.ssh"' devi@65: cat $sshkey | $lmssh $ssh_user@$host /bin/sh -c '"cat >>~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys"' devi@40: devi@40: ###install-lm devi@79: #cat $lminstall | ssh $ssh_user@$host /bin/sh -s $dirs devi@40: scp l3config.pm l3-agent $ssh_user@$host:/usr/local/bin devi@79: for i in $dirs devi@79: do devi@79: ssh $ssh_user@$host mkdir -p ${i}/.lilalo/ devi@79: scp l3bashrc $ssh_user@$host:${i}/.lilalo/ devi@79: done devi@40: devi@40: ###install-pm devi@40: scp PM/* $ssh_user@$host:/tmp devi@79: #ssh $ssh_user@$host 'cd /tmp; tar xfz Term-VT102*.gz; cd Term-VT102*[^z]; perl Makefile.PL; make ; make install' devi@65: ssh $ssh_user@$host 'cd /tmp; tar xfz Text-Iconv*.gz; cd Text-Iconv*[^z]; perl Makefile.PL; make ; make install' devi@40: devi@40: ###copy-lablogs devi@40: for i in $dirs devi@40: do devi@40: mkdir -p $lablogs/${i##*/} devi@40: scp -q $ssh_user@$host:${i}/.lilalo/* $lablogs/${i##*/} devi@40: done devi@40: devi@40: ###setlab devi@40: for i in $dirs devi@40: do devi@40: echo $lab | ssh $ssh_user@$host "cat > "${i}"/.labmaker/lab" devi@40: done devi@40: devi@40: ###makeout devi@51: cat > /tmp/lm.utf8 < devi@51: lm-name $firstname devi@51: lm-instructor "$instructor" devi@51: lm-manager "$manager" devi@51: lm-start-date $date devi@51: lm-stop-date $stopdate devi@51: lm-hostname $host devi@51: lm-ipaddress $ipaddress devi@51: LIST devi@51: cat /tmp/lm.utf8 | iconv -f UTF-8 -t KOI8-R > /tmp/lm.gent devi@40: common=$course-$date devi@40: personal=$course-$date-$email devi@40: mkdir -p $outpath/${common}/{Lablogs,Docs} devi@40: mkdir -p $outpath/${personal}/{Course,Files} devi@40: cd $outpath/${personal} devi@40: ln -s ../${common}/Lablogs . devi@40: ln -s ../${common}/Docs . devi@40: cd ~- devi@40: export UG_PERSONAL=$outpath/${personal}/Course devi@40: export UG_CENTER="$center" devi@40: export UG_COURSE="$course" devi@40: export UG_DATE="$date" devi@40: export UG_STUDENT="$name" devi@40: export UG_COMPANY="$company" devi@40: export UG_MAIL="$email" devi@40: cd $coursepath; make personal; cd ~- devi@40: devi@40: ###POST-makeout devi@61: rnd=${RANDOM}${RANDOM}${RANDOM} devi@40: rm -rf /tmp/$course-$date devi@40: mkdir /tmp/$course-$date devi@40: find $outpath/*$date* -name \*.pdf -exec cp {} /tmp/$course-$date/ \; devi@40: cd /tmp devi@41: rm -rf $course-$date.zip 2> /dev/null devi@40: zip -r $course-$date.zip $course-$date devi@61: mv $course-$date.zip /var/www/igor/tmp/$course-$date-${rnd}.zip devi@40: mutt -s 'Сгенерированы методички' imchubin\@mail.ru < /dev/null devi@47: mkdir -p /tmp/lilalo-$course-$date/l3 devi@47: cp /var/www/l3/* /tmp/lilalo-$course-$date/l3 devi@48: ./l3-cgi --cgi2file /tmp/lilalo-$course-$date/index.html --cgi_path_info $date devi@41: cd /tmp devi@41: rm -rf lilalo-$course-$date.zip 2> /dev/null devi@41: zip -r lilalo-$course-$date.zip lilalo-$course-$date devi@41: devi@60: ###PRE-send-current-logs devi@60: rm -rf /tmp/lilalo-$course-$date 2> /dev/null devi@60: mkdir -p /tmp/lilalo-$course-$date/l3 devi@60: cp /var/www/l3/* /tmp/lilalo-$course-$date/l3 devi@60: ./l3-cgi --cgi2file /tmp/lilalo-$course-$date/index.html --cgi_path_info $date devi@60: cd /tmp devi@60: rm -rf lilalo-$course-$date.zip 2> /dev/null devi@60: zip -r lilalo-$course-$date.zip lilalo-$course-$date devi@60: devi@41: devi@41: ###send-logs devi@49: #cat >> /tmp/letters <> /tmp/letters <