]> git.decadent.org.uk Git - dak.git/commitdiff
Add yearly cronjob
authorJoerg Jaspert <joerg@debian.org>
Wed, 30 Dec 2015 22:25:34 +0000 (23:25 +0100)
committerJoerg Jaspert <joerg@debian.org>
Wed, 30 Dec 2015 22:25:34 +0000 (23:25 +0100)
config/debian/yearly.functions [new file with mode: 0644]
config/debian/yearly.tasks [new file with mode: 0644]
config/debian/yearly.variables [new file with mode: 0644]

diff --git a/config/debian/yearly.functions b/config/debian/yearly.functions
new file mode 100644 (file)
index 0000000..a13b89b
--- /dev/null
@@ -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 (file)
index 0000000..b3ab392
--- /dev/null
@@ -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 (file)
index 0000000..2c03de3
--- /dev/null
@@ -0,0 +1,2 @@
+# -*- mode:sh -*-
+LASTYEAR=$(date -d 'last year' +%Y)