diff options
author | Roland Reichwein <mail@reichwein.it> | 2022-12-31 22:00:11 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2022-12-31 22:00:11 +0100 |
commit | 9465fd744cc2117190bafc1a3e2da9f10ca29bf9 (patch) | |
tree | 7d94bdaaa37cabb58cede695b03082b8360167bd /whiteboard-cleanup | |
parent | af1c4ee4d74ff7afc997372802d851d11daad418 (diff) |
Storage via SQLite, Added tests (WIP)
Diffstat (limited to 'whiteboard-cleanup')
-rwxr-xr-x | whiteboard-cleanup | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/whiteboard-cleanup b/whiteboard-cleanup deleted file mode 100755 index 7a987e0..0000000 --- a/whiteboard-cleanup +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Cleanup global whiteboard files -# -# To be called by cron -# - -set -e - -# look up config file -CONFIGFILE=/etc/whiteboard.conf -XMLLINTOPTS="--nonet --nocdata --nocatalogs" -DATAPATH=`xmllint --xpath "/config/datapath/text()" $XMLLINTOPTS $CONFIGFILE` -MAXAGE=`xmllint --xpath "/config/maxage/text()" $XMLLINTOPTS $CONFIGFILE` - -cd $DATAPATH - -ls -1 | while read i ; do - AGE=$((`date +"%s"` - `stat -c "%Y" $i`)) - if [[ "$AGE" -gt "$MAXAGE" ]] ; then - echo "Deleting entry $i ..." - rm $i - fi -done |