]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.monthly
set the tmpdir variable
[dak.git] / config / debian / cron.monthly
index 99bb434fdd008bb42b40a28ac4702e68c9cd9b53..685a1939736f24600b0f5c7f90a73230b153b2fe 100755 (executable)
@@ -1,24 +1,35 @@
 #!/bin/sh
 #
-# Run at the beginning of the month via cron, out of katie's crontab.
+# Run at the beginning of the month via cron, out of dak's crontab.
 
 set -e
-export SCRIPTVARS=/org/ftp.debian.org/katie/vars
+set -u
+export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
 . $SCRIPTVARS
 
 ################################################################################
 
 DATE=`date -d yesterday +%y%m`
 
-cd /org/ftp.debian.org/mail/archive
+cd ${base}/mail/archive
 for m in mail bxamail; do
     if [ -f $m ]; then
         mv $m ${m}-$DATE
+        touch ${m}
+        chown dak:ftpteam ${m}
+        chmod 660 ${m}
         sleep 20
-        gzip -9 ${m}-$DATE
-        chgrp debadmin ${m}-$DATE.gz
-        chmod 660 ${m}-$DATE.gz
+        xz -9 ${m}-$DATE
+        chgrp $ftpgroup ${m}-$DATE.xz
+        chmod 660 ${m}-$DATE.xz
     fi;
 done
 
+DATE=`date +%Y-%m`
+cd ${base}/log
+touch $DATE
+ln -sf $DATE current
+chmod g+w $DATE
+chown dak:ftpteam $DATE
+
 ################################################################################