X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.monthly;h=980cb6d6905d63651932c50e6d516d80f804e876;hb=50db22ea5f288daa39f81138a41a509d9a41cc3e;hp=3d4c8c1164a944e93b306cb48078f36f13fcd28e;hpb=6411bdb24f02bb6ab902502ae4b0c78bf7dc9034;p=dak.git diff --git a/config/debian/cron.monthly b/config/debian/cron.monthly index 3d4c8c11..980cb6d6 100755 --- a/config/debian/cron.monthly +++ b/config/debian/cron.monthly @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/bash # # Run at the beginning of the month via cron, out of dak's crontab. @@ -11,7 +11,7 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars DATE=`date -d yesterday +%y%m` -cd /srv/ftp-master.debian.org/mail/archive +cd ${base}/mail/archive for m in mail bxamail; do if [ -f $m ]; then mv $m ${m}-$DATE @@ -19,10 +19,17 @@ for m in mail bxamail; do chown dak:ftpteam ${m} chmod 660 ${m} sleep 20 - gzip -9 ${m}-$DATE - chgrp $ftpgroup ${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 + ################################################################################