From ad59da36570aaa6af25b96bd2bbc4077b93d9e4d Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Wed, 30 Dec 2015 23:25:34 +0100 Subject: [PATCH] Add yearly cronjob --- config/debian/yearly.functions | 11 +++++++++++ config/debian/yearly.tasks | 2 ++ config/debian/yearly.variables | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 config/debian/yearly.functions create mode 100644 config/debian/yearly.tasks create mode 100644 config/debian/yearly.variables 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) -- 2.39.2