You can subscribe to this list here.
2007 |
Jan
|
Feb
(23) |
Mar
(4) |
Apr
(60) |
May
(80) |
Jun
(24) |
Jul
(12) |
Aug
(12) |
Sep
(27) |
Oct
(59) |
Nov
(152) |
Dec
(135) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(19) |
Feb
(41) |
Mar
(8) |
Apr
(12) |
May
(14) |
Jun
(8) |
Jul
(23) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(1) |
2009 |
Jan
(1) |
Feb
(8) |
Mar
(6) |
Apr
(9) |
May
(2) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
|
Nov
(3) |
Dec
|
2010 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Adam C. <ad...@us...> - 2009-04-14 14:07:30
|
Update of /cvsroot/hcoop/domtool2/src/plugins In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25265/src/plugins Modified Files: apache.sml Log Message: Some mod_expires support Index: apache.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/plugins/apache.sml,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** apache.sml 17 Feb 2009 16:30:22 -0000 1.84 --- apache.sml 14 Apr 2009 14:07:25 -0000 1.85 *************** *** 1,4 **** (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006-2007, Adam Chlipala * * This program is free software; you can redistribute it and/or --- 1,4 ---- (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006-2009, Adam Chlipala * * This program is free software; you can redistribute it and/or *************** *** 242,245 **** --- 242,258 ---- | _ => NONE + val interval_base = fn (EVar "access", _) => SOME "access" + | (EVar "modification", _) => SOME "modification" + | _ => NONE + + val interval = fn (EVar "years", _) => SOME "years" + | (EVar "months", _) => SOME "months" + | (EVar "weeks", _) => SOME "weeks" + | (EVar "days", _) => SOME "days" + | (EVar "hours", _) => SOME "hours" + | (EVar "minutes", _) => SOME "minutes" + | (EVar "seconds", _) => SOME "seconds" + | _ => NONE + val vhostsChanged = ref false val logDeleted = ref false *************** *** 423,426 **** --- 436,441 ---- val rewriteEnabled = ref false val localRewriteEnabled = ref false + val expiresEnabled = ref false + val localExpiresEnabled = ref false val currentVhost = ref "" val currentVhostId = ref "" *************** *** 484,487 **** --- 499,504 ---- rewriteEnabled := false; localRewriteEnabled := false; + expiresEnabled := false; + localExpiresEnabled := false; vhostFiles := map (fn (node, ip) => let *************** *** 586,590 **** fn () => (write "\t</Location>\n"; inLocal := false; ! localRewriteEnabled := false)) val () = Env.container_one "directory" --- 603,608 ---- fn () => (write "\t</Location>\n"; inLocal := false; ! localRewriteEnabled := false; ! localExpiresEnabled := false)) val () = Env.container_one "directory" *************** *** 597,601 **** fn () => (write "\t</Directory>\n"; inLocal := false; ! localRewriteEnabled := false)) val () = Env.container_one "filesMatch" --- 615,620 ---- fn () => (write "\t</Directory>\n"; inLocal := false; ! localRewriteEnabled := false; ! localExpiresEnabled := false)) val () = Env.container_one "filesMatch" *************** *** 606,610 **** write "\">\n"), fn () => (write "\t</FilesMatch>\n"; ! localRewriteEnabled := false)) fun checkRewrite () = --- 625,630 ---- write "\">\n"), fn () => (write "\t</FilesMatch>\n"; ! localRewriteEnabled := false; ! localExpiresEnabled := false)) fun checkRewrite () = *************** *** 621,624 **** --- 641,657 ---- rewriteEnabled := true) + fun checkExpires () = + if !inLocal then + if !localExpiresEnabled then + () + else + (write "\tExpiresActive on\n"; + localExpiresEnabled := true) + else if !expiresEnabled then + () + else + (write "\tExpiresActive on\n"; + expiresEnabled := true) + val () = Env.action_three "localProxyRewrite" ("from", Env.string, "to", Env.string, "port", Env.int) *************** *** 633,636 **** --- 666,687 ---- write " [P]\n")) + val () = Env.action_four "expiresByType" + ("mime", Env.string, "base", interval_base, "num", Env.int, "inter", interval) + (fn (mime, base, num, inter) => + (checkExpires (); + write "\tExpiresByType\t\""; + write mime; + write "\"\t\""; + write base; + write " plus "; + if num < 0 then + (write "-"; + write (Int.toString (~num))) + else + write (Int.toString num); + write " "; + write inter; + write "\"\n")) + val () = Env.action_two "proxyPass" ("from", Env.string, "to", Env.string) |
From: Adam C. <ad...@us...> - 2009-04-14 14:07:30
|
Update of /cvsroot/hcoop/domtool2/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25265/src Modified Files: domain.sml env.sig env.sml Log Message: Some mod_expires support Index: domain.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/domain.sml,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** domain.sml 17 Feb 2009 16:30:22 -0000 1.69 --- domain.sml 14 Apr 2009 14:07:25 -0000 1.70 *************** *** 236,239 **** --- 236,243 ---- validNode + val _ = Env.type_one "mime_type" + Env.string + (CharVector.exists (fn ch => ch = #"/")) + val _ = Env.registerFunction ("your_ip_to_ip", fn [e] => SOME e Index: env.sig =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/env.sig,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** env.sig 16 Dec 2007 22:34:32 -0000 1.14 --- env.sig 14 Apr 2009 14:07:25 -0000 1.15 *************** *** 74,77 **** --- 74,80 ---- -> string * 'a arg * string * 'b arg * string * 'c arg -> ('a * 'b * 'c -> unit) -> unit + val action_four : string + -> string * 'a arg * string * 'b arg * string * 'c arg * string * 'd arg + -> ('a * 'b * 'c * 'd -> unit) -> unit val actionV_none : string -> (env_vars -> unit) -> unit Index: env.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/env.sml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** env.sml 16 Dec 2007 22:34:32 -0000 1.15 --- env.sml 14 Apr 2009 14:07:25 -0000 1.16 *************** *** 150,153 **** --- 150,163 ---- | three func _ _ (_, es) = badArgs (func, es) + fun four func (name1, arg1, name2, arg2, name3, arg3, name4, arg4) f (_, [e1, e2, e3, e4]) = + (case (arg1 e1, arg2 e2, arg3 e3, arg4 e4) of + (NONE, _, _, _) => badArg (func, name1, e1) + | (_, NONE, _, _) => badArg (func, name2, e2) + | (_, _, NONE, _) => badArg (func, name3, e3) + | (_, _, _, NONE) => badArg (func, name4, e4) + | (SOME v1, SOME v2, SOME v3, SOME v4) => (f (v1, v2, v3, v4); + SM.empty)) + | four func _ _ (_, es) = badArgs (func, es) + fun noneV func f (evs, []) = (f evs; SM.empty) *************** *** 190,193 **** --- 200,204 ---- fun action_two name args f = registerAction (name, two name args f) fun action_three name args f = registerAction (name, three name args f) + fun action_four name args f = registerAction (name, four name args f) fun actionV_none name f = registerAction (name, fn (env, _) => (f env; env)) |
From: Adam C. <ad...@us...> - 2009-04-14 14:07:29
|
Update of /cvsroot/hcoop/domtool2/lib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25265/lib Added Files: mod_expires.dtl Log Message: Some mod_expires support --- NEW FILE: mod_expires.dtl --- {{Support for Apache's mod_expires}} extern type mime_type; extern type interval_base; extern val access : interval_base; extern val modification : interval_base; extern type interval; extern val years : interval; extern val months : interval; extern val weeks : interval; extern val days : interval; extern val hours : interval; extern val minutes : interval; extern val seconds : interval; extern val expiresByType : mime_type -> interval_base -> int -> interval -> [^Vhost]; {{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_expires.html#expiresbytype"> Apache documentation</a>.}} |
From: Adam C. <ad...@us...> - 2009-04-09 20:57:59
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29259 Modified Files: check_apache Log Message: Make check_apache timeout command line-configurable Index: check_apache =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/check_apache,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** check_apache 3 Apr 2009 17:28:24 -0000 1.1 --- check_apache 9 Apr 2009 20:57:42 -0000 1.2 *************** *** 1,7 **** #!/bin/bash ! # Pass one command-line argument: the URL to try retrieving to see if Apache is working ! if wget -q -t 1 -O /dev/null -T 5 $1; then echo "No problem" >/dev/null else --- 1,7 ---- #!/bin/bash ! # Pass two command-line arguments: timeout in seconds and the URL to try retrieving to see if Apache is working ! if wget -q -t 1 -O /dev/null -T $1 $2; then echo "No problem" >/dev/null else |
From: Davor O. <do...@us...> - 2009-04-04 14:15:31
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24266 Modified Files: change-user-password hcoop-backup make-account-for-fyodor-user Log Message: Index: change-user-password =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/change-user-password,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** change-user-password 9 Oct 2007 19:56:47 -0000 1.3 --- change-user-password 4 Apr 2009 13:30:29 -0000 1.4 *************** *** 1,3 **** ! #!/bin/bash -ex # # Finally, set password for main user's principal --- 1,5 ---- ! #!/bin/bash -e ! ! # disable debug !/bin/bash -ex # # Finally, set password for main user's principal Index: hcoop-backup =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/hcoop-backup,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** hcoop-backup 15 Jan 2008 00:08:06 -0000 1.10 --- hcoop-backup 4 Apr 2009 13:30:29 -0000 1.11 *************** *** 9,14 **** # - exec >& /var/log/backup-to-megacz.com-log - PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin #COMPRESS_EXT=.bz2 --- 9,12 ---- *************** *** 16,43 **** COMPRESS_EXT=.gz COMPRESS_PROG=gzip ! IFS=$'\n' ! KEYFILE=/etc/backup-encryption-key ! BACKUPDIR=/afs/megacz.com/private/hcoop-backup/ ! cd $BACKUPDIR ! find * -prune -ctime +1 -exec rm -rf {} \; || true ! SUBDIR=`date +%Y.%m.%d` ! rm -rf $SUBDIR ! mkdir -p $SUBDIR ! cd $SUBDIR groups ! echo 'I am in:' ! pwd echo ! echo building package lists... dpkg-query -W -f='${Package}\n' > packages (cd /; find / /usr/ /usr/local/ /var/ -xdev) | sort | uniq > allfiles dpkg-query -W -f='${Package}\n' | xargs dpkg -L | sort | uniq > debfiles ! dpkg-query -W -f='${Conffiles}\n' | grep / | cut -b2- | sed 's_ .*__' | sort | uniq > conffiles diff allfiles debfiles | grep '^<' | cut -b 3- | \ --- 14,46 ---- COMPRESS_EXT=.gz COMPRESS_PROG=gzip + KEYFILE=/etc/backup-encryption-key + BACKUPTMP=/var/backups/hcoop-backup + CURDATE=$(date -u +%Y.%m.%d) ! MOVE_OVER=$(dirname $0)/rsync.net-move-over ! IFS=$'\n' ! # Initialize storage area ! RSYNCDIR=/vicepa/hcoop-backups/files ! rm -fr $RSYNCDIR ! mkdir -p $RSYNCDIR/$CURDATE ! chmod og=rx,u=rwx $RSYNCDIR ! chmod og= $RSYNCDIR/$CURDATE ! # Initialize backup staging area ! mkdir -p $BACKUPTMP ! cd $BACKUPTMP groups ! echo "I am in: $(pwd)" echo ! echo "Building package lists..." dpkg-query -W -f='${Package}\n' > packages (cd /; find / /usr/ /usr/local/ /var/ -xdev) | sort | uniq > allfiles dpkg-query -W -f='${Package}\n' | xargs dpkg -L | sort | uniq > debfiles ! dpkg-query -W -f='${Conffiles}\n' | grep / | cut -b2- | \ ! sed 's_ .*__' | sort | uniq > conffiles diff allfiles debfiles | grep '^<' | cut -b 3- | \ *************** *** 47,50 **** --- 50,54 ---- grep -v ^/var/backups | \ grep -v ^/var/lib/changetrack | \ + grep -v ^/var/local/lib/spamd | \ grep -v ^/var/run | \ grep -v ^/var/lock | \ *************** *** 63,74 **** grep -v '^/usr/lib/courier/.*\.rand$' | \ grep -v '^/usr/lib/gconv/gconv-modules\.cache$' | \ grep -v '^/usr/lib/graphviz/config$' | \ grep -v '^/usr/lib/locale/locale-archive$' | \ - grep -v '^/usr/share/info/dir$' | \ - grep -v '^/usr/share/info/dir\.old$' | \ grep -v '^/usr/share/emacs21/site-lisp/' | \ grep -v '^/usr/share/emacs22/site-lisp/' | \ ! grep -v '^/usr/share/vim/addons/doc/tags$' | \ ! cat > backupfiles cat conffiles >> backupfiles --- 67,81 ---- grep -v '^/usr/lib/courier/.*\.rand$' | \ grep -v '^/usr/lib/gconv/gconv-modules\.cache$' | \ + grep -v '^/usr/lib/ghc[^/*]/package\.conf$' | \ + grep -v '^/usr/lib/ghc[^/*]/package\.conf\.old$' | \ grep -v '^/usr/lib/graphviz/config$' | \ grep -v '^/usr/lib/locale/locale-archive$' | \ grep -v '^/usr/share/emacs21/site-lisp/' | \ grep -v '^/usr/share/emacs22/site-lisp/' | \ ! grep -v '^/usr/share/info/dir$' | \ ! grep -v '^/usr/share/info/dir\.old$' | \ ! grep -v '^/usr/share/snmp/mibs/\.index$' | \ ! grep -v '^/usr/share/vim/addons/doc/tags$' \ ! > backupfiles cat conffiles >> backupfiles *************** *** 81,84 **** --- 88,92 ---- grep -v ^/usr/lib/python2.4/ | \ grep -v ^/var/lib/python-support | \ + grep -v ^/usr/share/jed/lib | \ grep -v ^/usr/share/man | \ grep -v ^/usr/share/perl5/IkiWiki/Plugin | \ *************** *** 87,91 **** grep -v ^/vmlinuz.old | \ grep -v '^/sbin/[a-z\-]*\.modutils$' | \ ! grep -v ^/opt/dell/srvadmin/ | \ grep -v ^/boot/ | \ grep -v ^/dev/ | \ --- 95,99 ---- grep -v ^/vmlinuz.old | \ grep -v '^/sbin/[a-z\-]*\.modutils$' | \ ! grep -v ^/opt | \ grep -v ^/boot/ | \ grep -v ^/dev/ | \ *************** *** 98,108 **** grep -v ^/var/lib/postgres/ | \ grep -v ^/var/lib/postgresql/ | \ ! xargs -I{} -d\\n -- bash -c "test -L '{}' || echo '{}'" | \ ! cat > complain tar clpf - --ignore-failed-read --no-recursion -C / -T backupfiles | \ $COMPRESS_PROG | \ ccrypt -k $KEYFILE -e | \ ! catsync hcoop.backup.tar$COMPRESS_EXT.aescrypt vos listvol deleuze | \ --- 106,140 ---- grep -v ^/var/lib/postgres/ | \ grep -v ^/var/lib/postgresql/ | \ ! xargs -I{} -d\\n -- bash -c "test -L '{}' || echo '{}'" > complain + F=hcoop.backup.tar$COMPRESS_EXT.aescrypt tar clpf - --ignore-failed-read --no-recursion -C / -T backupfiles | \ $COMPRESS_PROG | \ ccrypt -k $KEYFILE -e | \ ! $MOVE_OVER $CURDATE $F ! ! # Acquire lock before messing with spamd ! COUNT=0 ! LOCK=/var/local/lib/spamd/.lock ! while test -f $LOCK; do ! sleep 2m ! COUNT=$(expr $COUNT + 1) ! if test $COUNT -eq 10; then ! # Enough waiting. Kill the process. ! P=$(cat $LOCK) || : ! test -n "$P" && kill $P || : ! rm -f $LOCK ! break ! fi ! done ! touch $LOCK ! ! F=common.spamd.tar$COMPRESS_EXT.aescrypt ! tar clpf - --ignore-failed-read -C / /var/local/lib/spamd | \ ! $COMPRESS_PROG | \ ! ccrypt -k $KEYFILE -e > $F ! rm -f $LOCK ! < $F $MOVE_OVER $CURDATE $F ! rm -f $F vos listvol deleuze | \ *************** *** 114,138 **** sed 's_^ .*__' | \ sed 's_ .*$__' | \ ! grep '[A-Za-z]' | \ ! cat > volumes cat volumes | \ grep -v not-backed-up | \ xargs -I{} -d\\n -- \ ! bash -c \ ! "vos dump -id {} -localauth -clone | $COMPRESS_PROG | ccrypt -k $KEYFILE -e | catsync {}.dump$COMPRESS_EXT.aescrypt" ! echo backing up databases tar -C /var/backups/databases/ -cf - . | \ $COMPRESS_PROG | \ ! ccrypt -k $KEYFILE -e \ ! | catsync databases.tar$COMPRESS_EXT.aescrypt grep '[a-z/]' complain && \ ! mail -a 'From: Adam Megacz <me...@hc...>' \ -s "automated message: annoying files found on deleuze (please do something about them)" ad...@hc... \ < complain \ ! || true ! ! echo done --- 146,179 ---- sed 's_^ .*__' | \ sed 's_ .*$__' | \ ! grep '[A-Za-z]' \ ! > volumes cat volumes | \ grep -v not-backed-up | \ xargs -I{} -d\\n -- \ ! bash -e -c \ ! "F={}.dump$COMPRESS_EXT.aescrypt ; ! vos dump -id {} -localauth -clone | ! $COMPRESS_PROG | ccrypt -k $KEYFILE -e | ! $MOVE_OVER $CURDATE \$F" || : ! echo "Backing up databases ..." ! F=databases.tar$COMPRESS_EXT.aescrypt tar -C /var/backups/databases/ -cf - . | \ $COMPRESS_PROG | \ ! ccrypt -k $KEYFILE -e | \ ! $MOVE_OVER $CURDATE $F + # Update file permissions so that rsync.net can access the backups + chmod -R go=,u-w $RSYNCDIR/$CURDATE + chmod u+w $RSYNCDIR/$CURDATE + chown -R rsync $RSYNCDIR/$CURDATE + + # Complain to admins if there are unknown files grep '[a-z/]' complain && \ ! mail -a 'From: The Backup Program <ba...@de...>' \ -s "automated message: annoying files found on deleuze (please do something about them)" ad...@hc... \ < complain \ ! || : + echo "Done." Index: make-account-for-fyodor-user =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/make-account-for-fyodor-user,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** make-account-for-fyodor-user 23 Oct 2007 16:43:29 -0000 1.9 --- make-account-for-fyodor-user 4 Apr 2009 13:30:29 -0000 1.10 *************** *** 13,20 **** ssh $AD...@fy... "sudo cat /home/$USER/.mire-password" || \ (echo == sending complaint to $US...@hc... ====================================================;\ ! echo 'please have a fyodor admin fix it (Adam Megacz is not a fyodor admin)' |\ mail -a 'From: Adam Megacz <me...@hc...>' \ -c ad...@hc... \ ! -s "you have damaged the permissions on your ~/.mire-password" $US...@hc...) ssh $AD...@fy... 'sudo cat /home/$USER/.mire-password' && \ create-user $USER && \ --- 13,20 ---- ssh $AD...@fy... "sudo cat /home/$USER/.mire-password" || \ (echo == sending complaint to $US...@hc... ====================================================;\ ! cat /etc/migration-prob-message |\ mail -a 'From: Adam Megacz <me...@hc...>' \ -c ad...@hc... \ ! -s "HCoop.net automatic account creation output" $US...@hc...) ssh $AD...@fy... 'sudo cat /home/$USER/.mire-password' && \ create-user $USER && \ |
From: Davor O. <do...@us...> - 2009-04-04 13:44:13
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27882 Modified Files: quotadisplay Log Message: * Always display DB volume info, no need for a special switch Thanks adamc for pointing it out. Index: quotadisplay =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/quotadisplay,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** quotadisplay 4 Apr 2009 13:03:03 -0000 1.1 --- quotadisplay 4 Apr 2009 13:41:00 -0000 1.2 *************** *** 5,8 **** PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER ! fs lq ~ ~/Maildir ${1:+/afs/hcoop.net/common/databases/$PATHBITS} --- 5,8 ---- PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER ! fs lq ~ ~/Maildir /afs/hcoop.net/common/databases/$PATHBITS |
From: Davor O. <do...@us...> - 2009-04-04 13:08:52
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15323 Modified Files: create-user Log Message: * Commit changes to the create-user script from last month * Modify database directories creation routine such that it allows users to read the base dir (.../databases/$PATHBITS), but not the mysql/pgsql subdirectories. This change allows them to retrieve their volume quota info while preserving our policy of not letting user browse their actual database directories. Index: create-user =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/create-user,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** create-user 12 Dec 2007 17:25:17 -0000 1.40 --- create-user 4 Apr 2009 13:08:39 -0000 1.41 *************** *** 176,182 **** # public_html ! mkdir -p $HOMEPATH/public_html ! chown $USER:nogroup $HOMEPATH/public_html ! fs sa $HOMEPATH/public_html system:anyuser rl # .procmail.d --- 176,184 ---- # public_html ! test -e $HOMEPATH/public_html || \ ! (mkdir -p $HOMEPATH/public_html; \ ! chown $USER:nogroup $HOMEPATH/public_html; \ ! fs sa $HOMEPATH/public_html system:anyuser none; \ ! fs sa $HOMEPATH/public_html $USER.daemon rl) # .procmail.d *************** *** 215,219 **** echo -e "This email account is provided as a service for HCoop members." \ "\n\nTo learn how to use it, please visit the page" \ ! "\n<http://wiki2.hcoop.net/MemberManual/Email> on our website."| \ mail -s "Welcome to your HCoop email store" \ -e -a "From: pos...@hc..." \ --- 217,221 ---- echo -e "This email account is provided as a service for HCoop members." \ "\n\nTo learn how to use it, please visit the page" \ ! "\n<http://wiki.hcoop.net/MemberManual/Email> on our website."| \ mail -s "Welcome to your HCoop email store" \ -e -a "From: pos...@hc..." \ *************** *** 242,249 **** vos create -server afs -partition a -name db.$USER -maxquota 400000 fs mkmount -dir /afs/.hcoop.net/common/.databases/$PATHBITS -vol db.$USER -rw - vos release common.databases fs sa -dir $DBPATH -acl system:postgres l fs sa -dir $DBPATH -acl system:mysql l fs sa -dir $DBPATH -acl system:backup rl fi --- 244,251 ---- vos create -server afs -partition a -name db.$USER -maxquota 400000 fs mkmount -dir /afs/.hcoop.net/common/.databases/$PATHBITS -vol db.$USER -rw fs sa -dir $DBPATH -acl system:postgres l fs sa -dir $DBPATH -acl system:mysql l fs sa -dir $DBPATH -acl system:backup rl + fs sa -dir $DBPATH -acl $USER rl fi *************** *** 253,256 **** --- 255,259 ---- chown postgres:postgres $PGDIR fs sa -dir $PGDIR -acl system:postgres write + fs sa -dir $PGDIR -acl $USER none sudo -u postgres psql -c "CREATE TABLESPACE user_$USER OWNER postgres LOCATION '$PGDIR'" template1 *************** *** 261,265 **** --- 264,270 ---- chown mysql:mysql $MYSQLDIR fs sa -dir $MYSQLDIR -acl system:mysql write + fs sa -dir $MYSQLDIR -acl $USER none + vos release common.databases # |
From: Davor O. <do...@us...> - 2009-04-04 13:03:13
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13666 Added Files: quotacheck quotadisplay Log Message: * Commit our quotacheck script that somehow didn't make it into cvs * Add new quotadisplay script intended to be run by users' in their startup files or quickly on cmdline to get quota overview. Works like this: docelic@mire:~$ quotadisplay Volume Name Quota Used %Used Partition user.docelic 2500000 1817271 73% 64% mail.docelic 2000000 509980 25% 64% docelic@mire:~$ quotadisplay withdb Volume Name Quota Used %Used Partition user.docelic 2500000 1817271 73% 64% mail.docelic 2000000 509980 25% 64% db.docelic 400000 9050 2% 64% --- NEW FILE: quotacheck --- #!/usr/bin/perl # docelic, Sat Dec 22 18:35:37 EST 2007 # Script warns people when they're approaching quota. The purpose # is not to 'behave' users but to give them a notice they should # fill quota increase request. (We want to prevent people from # ever actually running into quota limits, especially for Mail # and Database volumes. We use quotas to keep the shop clean, not # to impose restrictions). # Script retrieves volume info from deleuze, from there it # reads mail., user. and db. volumes into %vol, then # sees which volumes have > $threshold usage, relative to volume # quota. # # For volumes above threshold, it extracts the owner name from # volume name (like, mail.USERNAME) and saves info to %warn. # # vos listvol is parsed into structure like this: # # $vol{user.docelic}{diskused} = 36718 ( All fields from the # output of vos listvol are loaded into the hash. list of # fields is at the bottom of this script ) # # people who are over quota are in %warn: # # $warn{docelic}{user} = 0.9 # $warn{docelic}{mail} = 0.74 # # "Offenders" are saved to $state{$user} = [ run_number, exp_inc ] # and removed when they resolve their quota situation. For this # to work (and emails to get sent), pass --auto (most certain when # running from cron). # # run_number is the run (tick) when they were first spotted to # be over safe value, and exp_inc is the interval at which they # need to be reminded. (We use 1, 2, 4, 8, 16...). Each 'tick' # and number usually refers to 1 day (if ran from cron daily) # In the current implimentation, folks will be reminded on # 1st, 3rd, 7th, 15th and 31st day after their quota overrun. # Then they will be given 2 months of no messages, and then # after 3 months all together, the "warning cycle" will start again. # - If user is over 0.96 on mail or db volume, we will add 2% to his # quota one-time to alleviate immediate problem. use warnings; use strict; use Storable qw/nstore retrieve/; use Fatal qw/open write read close/; use Data::Dumper qw/Dumper/; # Warn threshold our %threshold = ( user => 0.8, mail => 0.6, db => 0.4 ); # AFS servers with volumes our @servers = qw/deleuze/; # Which volumes we want? # (Your volumes need to be in format (TYPE).USERNAME, otherwise # you will have to modify below where we take .USERNAME to mean # person's USERNAME). Changing this will also trigger changes # in template email (see DATA below). our $volume_pattern = '(mail|user|db)\.[a-zA-Z0-9]+'; # implicit ^...$ # Cache file our $statefile = '/var/cache/hcoop/quotacheck'; # Hash structure containing load of $statefile our %state; # Update cache & send out emails (--auto), or just run terminal report our $auto = grep {/^--auto$/} @ARGV; # Dump statefile in readable format to terminal and exit (--dump) our $dump = grep {/^--dump$/} @ARGV; # Do not send emails: our $nomail = grep {/^--nomail$/} @ARGV; # E-mail template that is evaled before sending our @template = <DATA>; # WARMUP # If statefile is there, eventually load it if ( -e $statefile ) { if ( $auto or $dump) { %state = %{ retrieve($statefile) } } } # Only dump wanted? if ( $dump ) { print Dumper \%state; exit 0 } # Increment tick $state{_tick}++; # BEGIN WOROK # Get volume lists from all servers my @list; for (@servers) { push @list, `vos listvol $_ -format` } chomp for @list; my $current; # name of volume being parsed my %vol; # will contain hash result of parsing my %warn; # list of people and data for > $threshold folks my %nowarn; # same data as in %warn, but for people NOT over threshold # # Copy vol from @list (vos listvol output) into %vol hash. # We read in all values; all values from vol listvol -format # output for a volume are read in. Such as # $vol{user.docelic}{type} = 'RW' # for (@list) { my ($parm, $value) = split(/\s+/, $_, 2); defined $parm and defined $value or next; if ( $parm eq 'name' ) { if ( $value =~ /^$volume_pattern$/ ) { $current = $value } else { $current = '' } } elsif ($current) { $vol{$current}{$parm} = $value } } # # Copy > $threshold people to %warn hash like this: # $warn{docelic}{mail} = 0.9 # while (my($k,$v) = each %vol) { next unless $$v{maxquota}; my ($type,$user) = split(/\./, $k); my $perc = sprintf('%.3f', $$v{diskused} / $$v{maxquota}); if ( $perc > $threshold{$type} ) { $warn{$user}{$type} = $perc; } # A bit of duplication with %warn, but wth.. $nowarn{$user}{$type} = $perc; } # # Reset counter for people who solved their quota thing somehow # my @tmp = keys %state; for my $person ( @tmp ) { next if $person eq '_tick'; unless ( $warn{$person} ) { print "User $person resolved quota problem\n"; delete $state{$person} } } # # Go over %warn, print info to terminal, update %state # when needed to create new entry for new quota detections. # while (my($k,$v) = each %warn) { print "$k "; my @line; while (my($k2,$v2) = each %$v) { push @line, "$k2=$v2"; } print "@line"; # Register person in %state if ( ! $state{$k} ) { $state{$k} = [ $state{_tick}, 2 ]; } print "\n"; } # # See who's entitled to receiving an email at this point; # that is, go over %state, send emails to people who need # to get it in this turn, and exponentially prolong the time # till next message from us. # (They receive message on 1st, 3rd, 7th, 15th, 31st...) # while (my($user,$state) = each %state ) { next if $user eq '_tick'; #print " $$state[0] + $$state[1] == $state{_tick} + 2\n"; if ( $$state[0] + $$state[1] == $state{_tick} + 2 ) { if ($auto and !$nomail) { print "Notifying $user, next notice in $$state[1] days.\n"; email_notify($user); } $$state[1] *= 2; # Following code would re-start the notifications we # send to people after 120 days of not clearing # their issue, but let's keep it disabled for # now.. They get a notice on 127th day, and then # on 255th etc., we don't reset the sequence. #$$state[1] >= 120 and do { # $$state[0] = $state{_tick}; # $$state[1] = 2; #}; } } # Write cache if ( $auto ) { # Already done above, with also printing a nice # message #for ( keys %warn ) { # delete $nowarn{$_} #} #for ( keys %nowarn) { # delete $state{$_}; #} nstore \%state, $statefile; } DONE: exit 0; ############################################## # Helpers below sub email_notify { my $user = shift; my @msg = @template; for ( @msg ) { $_ =~ s/\$vol{(\w+)}{(\w+)}/$vol{"$1.$user"}{$2}/mge; $_ =~ s/\$threshold{(\w+)}/$threshold{$1}/mge; $_ =~ s/\$warn{(\w+)}/$nowarn{$user}{$1}/mge; $_ =~ s/\$CRIT{(\w+)}/$warn{$user}{$1} ? " (APPROACHING QUOTA)" : ""/mge; } #print join('', @msg); open(MAIL, "| mail -s 'Approaching quota limit at HCoop' -a 'From: admins\@hcoop.net' -b 'docelic' '$user\@hcoop.net'"); { no warnings; print main::MAIL join('', @msg); } close MAIL; } # BEGIN_OF_ENTRY # name user.docelic # id 536872079 # serv 69.90.123.67 deleuze.hcoop.net # part /vicepa # status OK # backupID 536872081 # parentID 536872079 # cloneID 536955593 # inUse Y # needsSalvaged N # destroyMe N # type RW # creationDate 1195841197 Fri Nov 23 13:06:37 2007 # accessDate 0 Wed Dec 31 19:00:00 1969 # updateDate 1198364408 Sat Dec 22 18:00:08 2007 # backupDate 1198322931 Sat Dec 22 06:28:51 2007 # copyDate 1195843557 Fri Nov 23 13:45:57 2007 # flags 0 (Optional) # diskused 36718 # maxquota 400000 # minquota 0 (Optional) # filecount 6338 # dayUse 20097 # weekUse 172438 (Optional) # spare2 0 (Optional) # spare3 0 (Optional) # END_OF_ENTRY __DATA__ Hello, Some of your data volumes at HCoop are approaching quota limit. We use quotas to "keep the shop clean", but we regularly grant quota increase requests to all members who submit them. We wouldn't want you hit the quota limit, hence the early notice. This is especially true for the mail and database volumes where the data can accumulate "by itself", and where reaching quota limits may be particularly inconvenient. If you plan to store more data, it might be a good time to submit the quota change request through our portal[1]. Here are your volume statistics: Home: size=$vol{user}{diskused} KB quota=$vol{user}{maxquota} KB threshold=$threshold{user} use=$warn{user} $CRIT{user} Mail: size=$vol{mail}{diskused} KB quota=$vol{mail}{maxquota} KB threshold=$threshold{mail} use=$warn{mail} $CRIT{mail} Databases: size=$vol{db}{diskused} KB quota=$vol{db}{maxquota} KB threshold=$threshold{db} use=$warn{db} $CRIT{db} Please submit your disk quota increase request in a timely manner at: [1] https://members.hcoop.net/portal/quota These automatic notices will be sent to you at exponential intervals; that means in 2 days, 4 days, 8 days, 16 days and so on. The method ensures that, if you retain status-quo (don't submit a quota increase and don't reduce your data size), you get to receive the reminders less and less often. When and if the usage percentage of all your volumes drops below the corresponding quota thresholds, the notifications will stop and reset. Thank you, HCoop --- NEW FILE: quotadisplay --- #!/bin/sh # docelic, according to https://bugzilla.hcoop.net/show_bug.cgi?id=448 # Turned into a script callable by users on Sat Apr 4 08:49:27 EDT 2009 PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER fs lq ~ ~/Maildir ${1:+/afs/hcoop.net/common/databases/$PATHBITS} |
From: Adam C. <ad...@us...> - 2009-04-03 17:28:31
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14637 Added Files: check_apache Log Message: check_apache --- NEW FILE: check_apache --- #!/bin/bash # Pass one command-line argument: the URL to try retrieving to see if Apache is working if wget -q -t 1 -O /dev/null -T 5 $1; then echo "No problem" >/dev/null else /etc/init.d/apache2 restart echo "It seemed to be down at `date`." | mail -s "Apache restarted on `hostname`" ad...@hc... fi |
From: Adam C. <ad...@us...> - 2009-03-24 15:38:30
|
Update of /cvsroot/hcoop/portal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22508 Modified Files: config.sig config.sml Added Files: passgen.mlt passgen.sig passgen.sml Log Message: Passgen (admin part) Index: config.sig =================================================================== RCS file: /cvsroot/hcoop/portal/config.sig,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.sig 18 Nov 2007 23:03:08 -0000 1.3 --- config.sig 24 Mar 2009 15:38:21 -0000 1.4 *************** *** 9,11 **** --- 9,13 ---- val passwordFiles : string + val passgenDbstring : string + end --- NEW FILE: passgen.sml --- structure PassGen :> PASSGEN = struct open Sql Init fun lookup id = let val db = C.conn Config.passgenDbstring in (case C.oneOrNoRows db ($`SELECT pass FROM Pass WHERE id = ^(C.intToSql id)`) of NONE => NONE | SOME [pass] => SOME (C.stringFromSql pass) | _ => raise Fail "Bad \"SELECT pass\" row") before C.close db end end --- NEW FILE: passgen.mlt --- <% @header[("title", ["Generated passwords"])]; Group.requireGroupNum 0; if $"id" <> "" then val id = Web.stoi ($"id"); switch PassGen.lookup id of NONE => %>ID not found!<% | SOME pass => %><table class="blanks"> <tr> <td>ID:</td> <td><% id %></td> </tr> <tr> <td>Password:</td> <td><% pass %></td> </tr> </table><% end end %> <p><form method="post"><table class="blanks"> <tr> <td>ID:</td> <td><input name="id" size="5"></td> </tr> <tr> <td><input type="submit" value="Lookup"></td> </tr> </table></form></p> <% @footer[] %> --- NEW FILE: passgen.sig --- signature PASSGEN = sig val lookup : int -> string option end Index: config.sml =================================================================== RCS file: /cvsroot/hcoop/portal/config.sml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.sml 15 Dec 2007 17:19:30 -0000 1.6 --- config.sml 24 Mar 2009 15:38:26 -0000 1.7 *************** *** 12,14 **** --- 12,16 ---- val passwordFiles = "/var/lib/portal/" + val passgenDbstring = "dbname='passgen' user='www-data'" + end |
From: Adam C. <ad...@us...> - 2009-03-24 15:22:59
|
Update of /cvsroot/hcoop/portal/passgen In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17713 Added Files: .cvsignore Makefile after.mlt before.mlt config.sig config.sml exn.mlt mlt.conf passgen.mlt.in passgen.sig passgen.sml tables.sql Log Message: Passgen script (normal user part) --- NEW FILE: before.mlt --- <% PassGen.begin () %> --- NEW FILE: passgen.mlt.in --- <% val (id, pass) = PassGen.gen () %> <table> <tr><td align="right"><b>ID:</b></td> <td><% id %></td></tr> <tr><td align="right"><b>Password:</b></td> <td><% pass %></td></tr> </table> --- NEW FILE: tables.sql --- CREATE SEQUENCE PassSeq; CREATE TABLE Pass( id INTEGER PRIMARY KEY, pass TEXT NOT NULL); --- NEW FILE: .cvsignore --- .cm passgen.mlt --- NEW FILE: passgen.sml --- structure PassGen :> PASSGEN = struct open Config Sql structure C = PgClient val db = ref (NONE : C.conn option) fun getDb () = valOf (!db) fun begin () = let val c = C.conn dbstring in db := SOME c; ignore (C.dml c "BEGIN") end fun commit () = let val db = getDb () in C.dml db "COMMIT"; C.close db end fun gen () = let val db = getDb () val id = case C.oneRow db "SELECT nextval('PassSeq')" of [id] => C.intFromSql id | _ => raise Fail "Bad nextval() return" val proc = Unix.execute ("/usr/bin/apg", ["/usr/bin/apg", "-d", "-n", "1"]) val inf = Unix.textInstreamOf proc val pass = case TextIO.inputLine inf of NONE => raise Fail "No apg output" | SOME line => String.substring (line, 0, size line - 1) in ignore (Unix.reap proc); ignore (C.dml db ($`INSERT INTO Pass (id, pass) VALUES (^(C.intToSql id), ^(C.stringToSql pass))`)); (id, pass) end end --- NEW FILE: mlt.conf --- before before after after exn exn out out pub /afs/hcoop.net/user/h/hc/hcoop/public_html/cgi-bin cm /usr/local/share/smlsql/smlsql.cm cm /usr/local/share/smlsql/libpq/sources.cm --- NEW FILE: Makefile --- all: passgen.mlt passgen.mlt: /etc/hcoop.header /etc/hcoop.footer passgen.mlt.in hcoop_html "HCoop Passgen" passgen.mlt.in >passgen.mlt --- NEW FILE: passgen.sig --- signature PASSGEN = sig structure C : SQL_CLIENT val begin : unit -> unit val commit : unit -> unit val gen : unit -> int * string end --- NEW FILE: after.mlt --- <% PassGen.commit () %> --- NEW FILE: exn.mlt --- <html><head> <title>Hcoop Passgen: Exception</title> </head><body> <h1>Exception</h1> <% switch Web.getExn () of Fail msg => %> <b>Fail</b>: <% Web.htmlNl msg %> <% | OS.SysErr (name, NONE) => %> <b>System error</b>: <% Web.html name %> <% | OS.SysErr (name, SOME syserr) => %> <b>System error</b>: <% Web.html name %>: <% Web.html (OS.errorName syserr) %>: <% Web.htmlNl (OS.errorMsg syserr) %> <% | IO.Io {name, function, ...} => %> <b>IO error</b>: <% Web.html name %> for <% Web.html function %><br> <% | PassGen.C.Sql msg => %> <b>SQL</b>: <% Web.htmlNl msg %> <% | Web.Format s => %> <b>Format</b>: <% Web.htmlNl s %> <% | ex => %> <b>Unknown exception kind.</b> Backtrace: <% foreach s in SMLofNJ.exnHistory ex do %> <li> <% Web.html s %></li> <% end end %> </body></html> --- NEW FILE: config.sml --- structure Config :> CONFIG = struct val dbstring = "dbname=passgen" end --- NEW FILE: config.sig --- signature CONFIG = sig val dbstring : string end |
From: Adam C. <ad...@us...> - 2009-03-24 15:22:58
|
Update of /cvsroot/hcoop/portal/passgen/out In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17713/out Added Files: .cvsignore Log Message: Passgen script (normal user part) --- NEW FILE: .cvsignore --- * |
From: Adam C. <ad...@us...> - 2009-03-24 15:20:52
|
Update of /cvsroot/hcoop/portal/passgen/out In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17465/out Log Message: Directory /cvsroot/hcoop/portal/passgen/out added to the repository |
From: Adam C. <ad...@us...> - 2009-03-24 15:20:24
|
Update of /cvsroot/hcoop/portal/passgen In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17401/passgen Log Message: Directory /cvsroot/hcoop/portal/passgen added to the repository |
From: Adam C. <ad...@us...> - 2009-03-21 14:43:13
|
Update of /cvsroot/hcoop/portal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9281 Modified Files: balance.sml Log Message: Fix active balance summing Index: balance.sml =================================================================== RCS file: /cvsroot/hcoop/portal/balance.sml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** balance.sml 26 Apr 2008 16:21:59 -0000 1.13 --- balance.sml 21 Mar 2009 14:43:06 -0000 1.14 *************** *** 98,104 **** fun sumOwnedBalances () = case C.oneRow (getDb ()) ($`SELECT SUM(amount) ! FROM Balance JOIN WebUser ! ON Balance.name = WebUser.name ! AND WebUser.bal = Balance.id`) of [amt] => C.realFromSql amt | _ => raise Fail "sumOwnedBalance: no rows" --- 98,107 ---- fun sumOwnedBalances () = case C.oneRow (getDb ()) ($`SELECT SUM(amount) ! FROM Balance JOIN WebUser ! ON Balance.name = WebUser.name ! AND WebUser.bal = Balance.id ! JOIN Membership ! ON Membership.usr = WebUser.id ! AND Membership.grp = 1`) of [amt] => C.realFromSql amt | _ => raise Fail "sumOwnedBalance: no rows" |
From: Adam C. <ad...@us...> - 2009-02-19 14:20:01
|
Update of /cvsroot/hcoop/domtool2/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5446/src Modified Files: main.sml Log Message: Catch OpenSSL exceptions on slave connection acceptance Index: main.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/main.sml,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** main.sml 17 Feb 2009 16:46:03 -0000 1.109 --- main.sml 19 Feb 2009 14:19:56 -0000 1.110 *************** *** 1684,1750 **** fun loop () = ! case OpenSSL.accept sock of ! NONE => () ! | SOME bio => ! let ! val peer = OpenSSL.peerCN bio ! val () = print ("\nConnection from " ^ peer ^ " at " ^ now () ^ "\n") ! in ! if peer = Config.dispatcherName then let ! fun loop' files = ! case Msg.recv bio of ! NONE => print "Dispatcher closed connection unexpectedly\n" ! | SOME m => ! case m of ! MsgFile file => loop' (file :: files) ! | MsgDoFiles => (Slave.handleChanges files; ! Msg.send (bio, MsgOk)) ! | MsgRegenerate => (Domain.resetLocal (); ! Msg.send (bio, MsgOk)) ! | _ => (print "Dispatcher sent unexpected command\n"; ! Msg.send (bio, MsgError "Unexpected command")) ! in ! loop' []; ! ignore (OpenSSL.readChar bio); ! OpenSSL.close bio; ! loop () ! end ! else if peer = "domtool" then ! case Msg.recv bio of ! SOME MsgShutdown => (OpenSSL.close bio; ! print ("Shutting down at " ^ now () ^ "\n\n")) ! | _ => (OpenSSL.close bio; ! loop ()) ! else ! case Msg.recv bio of ! SOME (MsgQuery q) => (print (describeQuery q ^ "\n"); ! Msg.send (bio, answerQuery q); ! ignore (OpenSSL.readChar bio); ! OpenSSL.close bio; ! loop ()) ! | _ => (OpenSSL.close bio; ! loop ()) ! end handle OpenSSL.OpenSSL s => ! (print ("OpenSSL error: " ^ s ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | e as OS.SysErr (s, _) => ! (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); ! print ("System error: "^ s ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | IO.Io {function, name, ...} => ! (print ("IO error: " ^ function ^ ": " ^ name ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | e => ! (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); ! print "Uncaught exception!\n"; ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) in loop (); --- 1684,1757 ---- fun loop () = ! (case OpenSSL.accept sock of ! NONE => () ! | SOME bio => ! let ! val peer = OpenSSL.peerCN bio ! val () = print ("\nConnection from " ^ peer ^ " at " ^ now () ^ "\n") ! in ! if peer = Config.dispatcherName then let ! fun loop' files = ! case Msg.recv bio of ! NONE => print "Dispatcher closed connection unexpectedly\n" ! | SOME m => ! case m of ! MsgFile file => loop' (file :: files) ! | MsgDoFiles => (Slave.handleChanges files; ! Msg.send (bio, MsgOk)) ! | MsgRegenerate => (Domain.resetLocal (); ! Msg.send (bio, MsgOk)) ! | _ => (print "Dispatcher sent unexpected command\n"; ! Msg.send (bio, MsgError "Unexpected command")) ! in ! loop' []; ! ignore (OpenSSL.readChar bio); ! OpenSSL.close bio; ! loop () ! end ! else if peer = "domtool" then ! case Msg.recv bio of ! SOME MsgShutdown => (OpenSSL.close bio; ! print ("Shutting down at " ^ now () ^ "\n\n")) ! | _ => (OpenSSL.close bio; ! loop ()) ! else ! case Msg.recv bio of ! SOME (MsgQuery q) => (print (describeQuery q ^ "\n"); ! Msg.send (bio, answerQuery q); ! ignore (OpenSSL.readChar bio); ! OpenSSL.close bio; ! loop ()) ! | _ => (OpenSSL.close bio; ! loop ()) ! end handle OpenSSL.OpenSSL s => ! (print ("OpenSSL error: " ^ s ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | e as OS.SysErr (s, _) => ! (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); ! print ("System error: "^ s ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | IO.Io {function, name, ...} => ! (print ("IO error: " ^ function ^ ": " ^ name ^ "\n"); ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ()) ! | e => ! (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); ! print "Uncaught exception!\n"; ! OpenSSL.close bio ! handle OpenSSL.OpenSSL _ => (); ! loop ())) ! handle OpenSSL.OpenSSL s => ! (print ("OpenSSL error: " ^ s ^ "\n"); ! loop ()) ! | e => ! (app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory e); ! print "Uncaught exception!\n"; ! loop ()) in loop (); |
From: Adam C. <ad...@us...> - 2009-02-17 16:46:09
|
Update of /cvsroot/hcoop/domtool2/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25845/src Modified Files: main.sml Log Message: ACL check on reusers requests Index: main.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/main.sml,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** main.sml 17 Feb 2009 16:30:22 -0000 1.108 --- main.sml 17 Feb 2009 16:46:03 -0000 1.109 *************** *** 1605,1610 **** | MsgReUsers => ! doIt (fn () => (usersChanged (); ! ("Users change callbacks run", NONE))) (fn () => ()) --- 1605,1615 ---- | MsgReUsers => ! doIt (fn () => if Acl.query {user = user, class = "priv", value = "regen"} ! orelse Acl.query {user = user, class = "priv", value = "all"} then ! (usersChanged (); ! ("Users change callbacks run", NONE)) ! else ! ("Unauthorized user asked to reusers!", ! SOME "You aren't authorized to regenerate files.")) (fn () => ()) |
From: Adam C. <ad...@us...> - 2009-02-17 16:30:33
|
Update of /cvsroot/hcoop/domtool2/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24711/scripts Modified Files: domtool-publish Log Message: Generation of slash-tilde waklog directives for each user Index: domtool-publish =================================================================== RCS file: /cvsroot/hcoop/domtool2/scripts/domtool-publish,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** domtool-publish 15 Mar 2008 16:37:25 -0000 1.24 --- domtool-publish 17 Feb 2009 16:30:22 -0000 1.25 *************** *** 75,80 **** /bin/chown -R domtool.domtool /var/log/apache/user ;; *) ! echo "Usage: domtool-publish [apache|bind|courier|exim|mailman|smtplog STRING]" ;; esac --- 75,84 ---- /bin/chown -R domtool.domtool /var/log/apache/user ;; + users) + /bin/cp /var/domtool/waklog.conf /etc/apache2/ + /etc/init.d/apache2 reload + ;; *) ! echo "Usage: domtool-publish [apache|bind|courier|exim|mailman|smtplog STRING|users]" ;; esac |
From: Adam C. <ad...@us...> - 2009-02-17 16:30:29
|
Update of /cvsroot/hcoop/domtool2/configDefault In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24711/configDefault Modified Files: apache.cfg apache.csg domtool.cfg domtool.cfs Log Message: Generation of slash-tilde waklog directives for each user Index: domtool.cfg =================================================================== RCS file: /cvsroot/hcoop/domtool2/configDefault/domtool.cfg,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** domtool.cfg 22 Sep 2008 15:05:13 -0000 1.37 --- domtool.cfg 17 Feb 2009 16:30:22 -0000 1.38 *************** *** 60,61 **** --- 60,63 ---- val worldReadable = ["/usr/share/moin", "/usr/share/apache/icons"] + + val publish_reusers = "/usr/bin/sudo " ^ domtool_publish ^ " users" Index: apache.cfg =================================================================== RCS file: /cvsroot/hcoop/domtool2/configDefault/apache.cfg,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** apache.cfg 18 Feb 2008 17:17:43 -0000 1.23 --- apache.cfg 17 Feb 2009 16:30:21 -0000 1.24 *************** *** 60,62 **** --- 60,64 ---- val defaultPhpVersion = 4 + val waklogUserFile = "/var/domtool/waklog.conf" + end Index: domtool.cfs =================================================================== RCS file: /cvsroot/hcoop/domtool2/configDefault/domtool.cfs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** domtool.cfs 28 Jun 2008 14:40:10 -0000 1.27 --- domtool.cfs 17 Feb 2009 16:30:22 -0000 1.28 *************** *** 67,68 **** --- 67,70 ---- val worldReadable : string list + + val publish_reusers : string Index: apache.csg =================================================================== RCS file: /cvsroot/hcoop/domtool2/configDefault/apache.csg,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** apache.csg 18 Feb 2008 17:17:43 -0000 1.15 --- apache.csg 17 Feb 2009 16:30:22 -0000 1.16 *************** *** 27,29 **** --- 27,31 ---- val defaultPhpVersion : int + val waklogUserFile : string + end |
From: Adam C. <ad...@us...> - 2009-02-17 16:30:28
|
Update of /cvsroot/hcoop/domtool2/src/plugins In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24711/src/plugins Modified Files: apache.sml Log Message: Generation of slash-tilde waklog directives for each user Index: apache.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/plugins/apache.sml,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** apache.sml 26 Jul 2008 14:20:37 -0000 1.83 --- apache.sml 17 Feb 2009 16:30:22 -0000 1.84 *************** *** 1083,1085 **** --- 1083,1105 ---- (fn path => write "\tAllowOverride None\n") + fun writeWaklogUserFile () = + let + val users = Acl.users () + val outf = TextIO.openOut Config.Apache.waklogUserFile + in + app (fn user => if String.isSuffix "_admin" user then + () + else + (TextIO.output (outf, "<Location /~"); + TextIO.output (outf, user); + TextIO.output (outf, ">\n\tWaklogEnabled on\n\tWaklogLocationPrincipal "); + TextIO.output (outf, user); + TextIO.output (outf, "/daemon@HCOOP.NET /etc/keytabs/user.daemon/"); + TextIO.output (outf, user); + TextIO.output (outf, "\n</Location>\n\n"))) users; + TextIO.closeOut outf + end + + val () = Domain.registerOnUsersChange writeWaklogUserFile + end |
From: Adam C. <ad...@us...> - 2009-02-17 16:30:28
|
Update of /cvsroot/hcoop/domtool2/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24711/src Modified Files: domain.sig domain.sml main-admin.sml main.sig main.sml msg.sml msgTypes.sml Log Message: Generation of slash-tilde waklog directives for each user Index: main.sig =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/main.sig,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** main.sig 10 Jul 2008 23:38:53 -0000 1.49 --- main.sig 17 Feb 2009 16:30:22 -0000 1.50 *************** *** 47,50 **** --- 47,51 ---- val requestRmuser : string -> unit val requestDescribe : string -> unit + val requestReUsers : unit -> unit val requestSlavePing : unit -> OS.Process.status Index: msgTypes.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/msgTypes.sml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** msgTypes.sml 9 Apr 2008 14:23:57 -0000 1.34 --- msgTypes.sml 17 Feb 2009 16:30:22 -0000 1.35 *************** *** 125,128 **** --- 125,130 ---- | MsgDescription of string (* Reply to MsgDescribe *) + | MsgReUsers + (* Rerun all callbacks for cases where the set of users has changed *) end Index: main-admin.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/main-admin.sml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** main-admin.sml 24 Feb 2008 20:36:46 -0000 1.26 --- main-admin.sml 17 Feb 2009 16:30:22 -0000 1.27 *************** *** 60,63 **** --- 60,64 ---- (Acl.read Config.aclFile; app (fn s => (print s; print "\n")) (Acl.users ())) + | ["reusers"] => Main.requestReUsers () | _ => (print "Invalid command-line arguments\n"; Index: domain.sig =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/domain.sig,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** domain.sig 15 Jul 2008 14:55:19 -0000 1.23 --- domain.sig 17 Feb 2009 16:30:22 -0000 1.24 *************** *** 116,118 **** --- 116,122 ---- (* Find files in a domain directory matching some patterns and generate * headings and contents listings for them. *) + + (* Callbacks to run whenever the set of Domtool users has changed *) + val registerOnUsersChange : (unit -> unit) -> unit + val onUsersChange : unit -> unit end Index: domain.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/domain.sml,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** domain.sml 14 Aug 2008 13:07:24 -0000 1.68 --- domain.sml 17 Feb 2009 16:30:22 -0000 1.69 *************** *** 990,992 **** --- 990,1003 ---- | (_, args) => Env.badArgs ("domainHost", args)) + val ouc = ref (fn () => ()) + + fun registerOnUsersChange f = + let + val f' = !ouc + in + ouc := (fn () => (f' (); f ())) + end + + fun onUsersChange () = !ouc () + end Index: main.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/main.sml,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** main.sml 24 Nov 2008 14:08:35 -0000 1.107 --- main.sml 17 Feb 2009 16:30:22 -0000 1.108 *************** *** 1,4 **** (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006-2007, Adam Chlipala * * This program is free software; you can redistribute it and/or --- 1,4 ---- (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006-2009, Adam Chlipala * * This program is free software; you can redistribute it and/or *************** *** 328,332 **** val _ = if !ErrorMsg.anyErrors then ! (print "J\n";raise ErrorMsg.Error) else () --- 328,332 ---- val _ = if !ErrorMsg.anyErrors then ! raise ErrorMsg.Error else () *************** *** 928,931 **** --- 928,946 ---- end + fun requestReUsers () = + let + val (_, bio) = requestBio (fn () => ()) + in + Msg.send (bio, MsgReUsers); + case Msg.recv bio of + NONE => print "Server closed connection unexpectedly.\n" + | SOME m => + case m of + MsgOk => print "Callbacks run.\n" + | MsgError s => print ("Failed: " ^ s ^ "\n") + | _ => print "Unexpected server reply.\n"; + OpenSSL.close bio + end + structure SS = StringSet *************** *** 1111,1114 **** --- 1126,1133 ---- (#1 (check G file), evs)) + fun usersChanged () = + (Domain.onUsersChange (); + ignore (OS.Process.system Config.publish_reusers)) + fun rmuser user = let *************** *** 1120,1124 **** in Acl.rmuser user; ! Domain.rmdom doms end --- 1139,1144 ---- in Acl.rmuser user; ! Domain.rmdom doms; ! usersChanged () end *************** *** 1266,1269 **** --- 1286,1293 ---- (Acl.grant acl; Acl.write Config.aclFile; + if #class acl = "user" then + usersChanged () + else + (); ("Granted permission " ^ #value acl ^ " to " ^ #user acl ^ " in " ^ #class acl ^ ".", NONE)) *************** *** 1580,1583 **** --- 1604,1612 ---- (fn () => ()) + | MsgReUsers => + doIt (fn () => (usersChanged (); + ("Users change callbacks run", NONE))) + (fn () => ()) + | _ => doIt (fn () => ("Unexpected command", Index: msg.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/msg.sml,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** msg.sml 9 Apr 2008 14:23:57 -0000 1.35 --- msg.sml 17 Feb 2009 16:30:22 -0000 1.36 *************** *** 237,240 **** --- 237,241 ---- | MsgDescription s => (OpenSSL.writeInt (bio, 40); OpenSSL.writeString (bio, s)) + | MsgReUsers => OpenSSL.writeInt (bio, 41) fun checkIt v = *************** *** 349,352 **** --- 350,354 ---- | 39 => Option.map MsgDescribe (OpenSSL.readString bio) | 40 => Option.map MsgDescription (OpenSSL.readString bio) + | 41 => SOME MsgReUsers | _ => NONE) |
From: Davor O. <do...@us...> - 2009-02-04 18:09:42
|
Update of /cvsroot/hcoop/misc/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30102 Modified Files: apache-sync-logs Log Message: * In verbose mode, improve error/status reporting by printing the actual reason whenever someone's directory is skipped and not synced * Commit changes someone did directly in scripts/ and didn't commit to cvs Index: apache-sync-logs =================================================================== RCS file: /cvsroot/hcoop/misc/scripts/apache-sync-logs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** apache-sync-logs 18 Dec 2007 21:32:11 -0000 1.14 --- apache-sync-logs 4 Feb 2009 18:09:33 -0000 1.15 *************** *** 32,35 **** --- 32,38 ---- # Skip deleted or empty log directories if test ! -d "$LOG_SRC" || ! ls "$LOG_SRC"/*/*/*.log >/dev/null 2>&1; then + if test "$VERBOSE" = "true"; then + echo "Skipping $USER (deleted or empty log dir $LOG_SRC)" + fi continue fi *************** *** 38,41 **** --- 41,47 ---- if test -d "$USER_HOME/.logs" && \ ! ls "$USER_HOME/.logs" >/dev/null 2>&1; then + if test "$VERBOSE" = "true"; then + echo "Skipping $USER (unreadable log dir $USER_HOME/.logs)" + fi continue fi *************** *** 43,46 **** --- 49,55 ---- # Skip people who do not have keytabs if test ! -f "$KEYTAB_DIR/$USER"; then + if test "$VERBOSE" = "true"; then + echo "Skipping $USER (missing keytab $KEYTAB_DIR/$USER)" + fi continue fi *************** *** 54,59 **** if test ! -d "$LOG_DEST"; then ! echo "Error: $LOG_DEST does not exist, please make it" ! ERROR=yes else rm -fr $TMP_DEST --- 63,74 ---- if test ! -d "$LOG_DEST"; then ! # echo "Error: $LOG_DEST does not exist, please make it" ! # ERROR=yes ! # We will assume that people know what they are doing when they ! # delete their ~/.logs/apache directory .... ! if test "$VERBOSE" = "true"; then ! echo "Skipping $USER (no $LOG_DEST directory)" ! fi ! continue else rm -fr $TMP_DEST *************** *** 62,66 **** chmod -R u=rwX,go=X $TMP_DEST k5start -qtU -f $KEYTAB_DIR/$USER \ ! -- su $USER -c "rsync -a $TMP_DEST/ $LOG_DEST/" rm -fr $TMP_DEST test "$VERBOSE" = "true" && echo " done." --- 77,81 ---- chmod -R u=rwX,go=X $TMP_DEST k5start -qtU -f $KEYTAB_DIR/$USER \ ! -- sudo -u $USER rsync -a $TMP_DEST/ $LOG_DEST/ rm -fr $TMP_DEST test "$VERBOSE" = "true" && echo " done." |
From: Adam C. <ad...@us...> - 2009-02-03 15:35:13
|
Update of /cvsroot/hcoop/portal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1181 Modified Files: ip.mlt Log Message: Suggest granting domtool ip privs Index: ip.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/ip.mlt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ip.mlt 29 Jan 2009 18:05:17 -0000 1.5 --- ip.mlt 3 Feb 2009 15:34:57 -0000 1.6 *************** *** 53,56 **** --- 53,57 ---- <li> Run <tt>ifup eth0:<i>N</i></tt>. <li> Restart Apache with <tt>/etc/init.d/apache2 restart</tt>.</li> + <li> Run <tt>domtool-admin grant <i><% name %></i> ip 69.90.123.<i>NNN</i></tt> </ol> <% end %> |
Update of /cvsroot/hcoop/portal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20983 Modified Files: apt.mlt cert.mlt domain.mlt ip.mlt list.mlt quota.mlt request.sml requestH.sml sec.mlt sign.mlt Log Message: Send ticket change notifications even if status doesn't change Index: apt.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/apt.mlt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** apt.mlt 19 Jan 2008 20:57:32 -0000 1.7 --- apt.mlt 29 Jan 2009 18:05:17 -0000 1.8 *************** *** 189,196 **** val newStatus = Apt.statusFromInt (Web.stoi ($"status")); Apt.modify {req with node = node, data = $"pkgs", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 189,194 ---- val newStatus = Apt.statusFromInt (Web.stoi ($"status")); Apt.modify {req with node = node, data = $"pkgs", msg = $"msg", status = newStatus}; ! if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: request.sml =================================================================== RCS file: /cvsroot/hcoop/portal/request.sml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** request.sml 25 Feb 2007 23:57:45 -0000 1.5 --- request.sml 29 Jan 2009 18:05:17 -0000 1.6 *************** *** 148,158 **** fun notifyMod (oldStatus, newStatus, changer, req) = ! notify (fn (_, mail) => ! (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has changed the status of this request from "); ! Mail.mwrite (mail, statusToString oldStatus); ! Mail.mwrite (mail, " to "); ! Mail.mwrite (mail, statusToString newStatus); ! Mail.mwrite (mail, ".\n\n"))) req end --- 148,163 ---- fun notifyMod (oldStatus, newStatus, changer, req) = ! if oldStatus = newStatus then ! notify (fn (_, mail) => ! (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has added a comment to this request.\n\n"))) req ! else ! notify (fn (_, mail) => ! (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has changed the status of this request from "); ! Mail.mwrite (mail, statusToString oldStatus); ! Mail.mwrite (mail, " to "); ! Mail.mwrite (mail, statusToString newStatus); ! Mail.mwrite (mail, ".\n\n"))) req end Index: sec.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/sec.mlt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** sec.mlt 25 May 2008 13:29:34 -0000 1.14 --- sec.mlt 29 Jan 2009 18:05:17 -0000 1.15 *************** *** 202,209 **** val newStatus = Sec.Req.statusFromInt (Web.stoi ($"status")); Sec.Req.modify {req with node = nodeNum, data = $"req", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 202,207 ---- val newStatus = Sec.Req.statusFromInt (Web.stoi ($"status")); Sec.Req.modify {req with node = nodeNum, data = $"req", msg = $"msg", status = newStatus}; ! if not (Sec.Req.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: ip.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/ip.mlt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ip.mlt 27 Sep 2008 14:32:43 -0000 1.4 --- ip.mlt 29 Jan 2009 18:05:17 -0000 1.5 *************** *** 115,122 **** val newStatus = Ip.statusFromInt (Web.stoi ($"status")); Ip.modify {req with node = node, data = $"port", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Ip.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 115,120 ---- val newStatus = Ip.statusFromInt (Web.stoi ($"status")); Ip.modify {req with node = node, data = $"port", msg = $"msg", status = newStatus}; ! if not (Ip.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: cert.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/cert.mlt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** cert.mlt 9 Apr 2008 13:45:02 -0000 1.8 --- cert.mlt 29 Jan 2009 18:05:17 -0000 1.9 *************** *** 110,117 **** val newStatus = Cert.statusFromInt (Web.stoi ($"status")); Cert.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Cert.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 110,115 ---- val newStatus = Cert.statusFromInt (Web.stoi ($"status")); Cert.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if not (Cert.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: sign.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/sign.mlt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sign.mlt 9 Apr 2008 13:45:02 -0000 1.1 --- sign.mlt 29 Jan 2009 18:05:17 -0000 1.2 *************** *** 128,135 **** val newStatus = Sign.statusFromInt (Web.stoi ($"status")); Sign.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Sign.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 128,133 ---- val newStatus = Sign.statusFromInt (Web.stoi ($"status")); Sign.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if not (Sign.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: domain.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/domain.mlt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** domain.mlt 19 Jan 2008 20:57:32 -0000 1.7 --- domain.mlt 29 Jan 2009 18:05:17 -0000 1.8 *************** *** 92,99 **** val newStatus = Domain.statusFromInt (Web.stoi ($"status")); Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 92,97 ---- val newStatus = Domain.statusFromInt (Web.stoi ($"status")); Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus}; ! if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: requestH.sml =================================================================== RCS file: /cvsroot/hcoop/portal/requestH.sml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** requestH.sml 25 Feb 2007 23:57:45 -0000 1.2 --- requestH.sml 29 Jan 2009 18:05:17 -0000 1.3 *************** *** 155,165 **** fun notifyMod {old, new, changer, req} = ! notify (fn (_, mail) => (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has changed the status of this request from "); ! Mail.mwrite (mail, statusToString old); ! Mail.mwrite (mail, " to "); ! Mail.mwrite (mail, statusToString new); ! Mail.mwrite (mail, ".\n\n"))) req end --- 155,170 ---- fun notifyMod {old, new, changer, req} = ! if old = new then ! notify (fn (_, mail) => (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has added a comment to this request.\n\n"))) req ! else ! notify (fn (_, mail) => ! (Mail.mwrite (mail, changer); ! Mail.mwrite (mail, " has changed the status of this request from "); ! Mail.mwrite (mail, statusToString old); ! Mail.mwrite (mail, " to "); ! Mail.mwrite (mail, statusToString new); ! Mail.mwrite (mail, ".\n\n"))) req end Index: quota.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/quota.mlt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** quota.mlt 19 Jan 2008 20:57:32 -0000 1.4 --- quota.mlt 29 Jan 2009 18:05:17 -0000 1.5 *************** *** 115,122 **** val newStatus = Quota.statusFromInt (Web.stoi ($"status")); Quota.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (Quota.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 115,120 ---- val newStatus = Quota.statusFromInt (Web.stoi ($"status")); Quota.modify {req with data = $"req", msg = $"msg", status = newStatus}; ! if not (Quota.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> Index: list.mlt =================================================================== RCS file: /cvsroot/hcoop/portal/list.mlt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** list.mlt 19 Jan 2008 20:57:32 -0000 1.12 --- list.mlt 29 Jan 2009 18:05:17 -0000 1.13 *************** *** 88,95 **** val newStatus = MailingList.statusFromInt (Web.stoi ($"status")); MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus}; ! if oldStatus <> newStatus then ! if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% ! end end %><h3>Request modified</h3> --- 88,93 ---- val newStatus = MailingList.statusFromInt (Web.stoi ($"status")); MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus}; ! if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then ! %><h3>Error sending e-mail notification</h3><% end %><h3>Request modified</h3> |
From: Adam C. <ad...@us...> - 2008-12-23 16:12:40
|
Update of /cvsroot/hcoop/portal/contact In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14077 Modified Files: contact.sml Log Message: Include Peer 1 contact info in contact report Index: contact.sml =================================================================== RCS file: /cvsroot/hcoop/portal/contact/contact.sml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** contact.sml 9 Apr 2008 13:45:03 -0000 1.3 --- contact.sml 23 Dec 2008 16:12:36 -0000 1.4 *************** *** 61,64 **** --- 61,78 ---- print "</ol>\n\n" end + + fun peer1 () = + let + val inf = TextIO.openIn "/afs/hcoop.net/user/h/hc/hcoop/contact/peer1.html" + + fun loop () = + case TextIO.inputLine inf of + NONE => () + | SOME line => (print line; + loop ()) + in + loop (); + TextIO.closeIn inf + end in print "<html><head><title>HCoop Emergency Contact Information</title></head><body><h1>HCoop Emergency Contact Information</h1>\n"; *************** *** 69,72 **** --- 83,90 ---- app doOne kinds; + + print "<h2>Peer 1 phone numbers</h2>\n\n"; + peer1 (); + print "</body></html>\n"; C.close db; |