X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.monthly;h=980cb6d6905d63651932c50e6d516d80f804e876;hb=b488bb6a14c4376fb533a544d1c24d4ce74a0f5f;hp=9d7a68ba9abcdd227b23d20c23db36717391d151;hpb=342a24f0e31c3b6637cd9926235c514f531ad604;p=dak.git diff --git a/config/debian/cron.monthly b/config/debian/cron.monthly index 9d7a68ba..980cb6d6 100755 --- a/config/debian/cron.monthly +++ b/config/debian/cron.monthly @@ -1,25 +1,35 @@ -#!/bin/sh +#! /bin/bash # # Run at the beginning of the month via cron, out of dak's crontab. set -e set -u -export SCRIPTVARS=/org/ftp.debian.org/dak/config/debian/vars +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 + ################################################################################