From: Joerg Jaspert Date: Wed, 30 Dec 2015 22:25:34 +0000 (+0100) Subject: Add yearly cronjob X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ad59da36570aaa6af25b96bd2bbc4077b93d9e4d;p=dak.git Add yearly cronjob --- diff --git a/config/debian/yearly.functions b/config/debian/yearly.functions new file mode 100644 index 00000000..a13b89bc --- /dev/null +++ b/config/debian/yearly.functions @@ -0,0 +1,11 @@ +# -*- mode:sh -*- + +function removalsarchive() { + cd ${webdir} + for ending in txt 822; do + mv removals.${ending} removals-${LASTYEAR}.${ending} + touch removals.${ending} + chmod g+w removals.${ending} + chown dak:ftpteam removals.${ending} + done +} diff --git a/config/debian/yearly.tasks b/config/debian/yearly.tasks new file mode 100644 index 00000000..b3ab392b --- /dev/null +++ b/config/debian/yearly.tasks @@ -0,0 +1,2 @@ +# FUNC ARGS TIME ERR BG +removalsarchive none none false false diff --git a/config/debian/yearly.variables b/config/debian/yearly.variables new file mode 100644 index 00000000..2c03de35 --- /dev/null +++ b/config/debian/yearly.variables @@ -0,0 +1,2 @@ +# -*- mode:sh -*- +LASTYEAR=$(date -d 'last year' +%Y)