aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-09-30 02:55:51 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-09-30 02:55:51 +0300
commit9ef57d6e987dc15c02a7cfec64834ebd9aed954f (patch)
treed001c7a16cdd5746d43c735c430b7470ae6039ab
parent41997666e4109b9ce22bb41407314402fe53f260 (diff)
downloadarching-kaos-tools-9ef57d6e987dc15c02a7cfec64834ebd9aed954f.tar.gz
arching-kaos-tools-9ef57d6e987dc15c02a7cfec64834ebd9aed954f.tar.bz2
arching-kaos-tools-9ef57d6e987dc15c02a7cfec64834ebd9aed954f.zip
At last a logrotating script
-rwxr-xr-xbin/ak-logrotate7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ak-logrotate b/bin/ak-logrotate
new file mode 100755
index 0000000..7bfee72
--- /dev/null
+++ b/bin/ak-logrotate
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+tar cvfz $AK_ARCHIVESDIR/logs_$(date -u +%s).tar.gz $AK_WORKDIR/akd.log $AK_WORKDIR/akd.err $AK_WORKDIR/logs
+
+cat /dev/null > $AK_WORKDIR/akd.log
+cat /dev/null > $AK_WORKDIR/akd.err
+cat /dev/null > $AK_WORKDIR/logs