View Issue Details

IDProjectCategoryView StatusLast Update
0000445apt-panopticonFeaturepublic2023-05-11 06:07
Reporteronefang Assigned Toonefang  
PriorityurgentSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version0.1 
Summary0000445: Add option for "keep X days of history"
DescriptionSo I no longer need to log onto those tiny boxes and delete old histories.
TagsNo tags attached.

Relationships

related to 0000446 assignedonefang Test CC.deb.devuan.org 

Activities

onefang

onefang

2023-05-09 20:32

administrator   ~0000604

snork wrote this -


#!/bin/sh
#
# 2023-04-18
# 1. Set $NUMDAYS to the number of days of results you wish to keep.
#    Default value is 3, minimum value is 1.
# 2. Set $PANOPATH to the location of apt_panopticon files without trailing slash.
#    Default value is /var/www/html/apt-panopticon/apt-panopticon.
# 3. Run this script daily (probably via cron). Example crontab entry:
#    5 1 * * * /var/www/html/apt-panopticon/apt-panopticon/trimresults.sh
# 4. If any cron runs are missed, you may have to manually rm the missed entries.

NUMDAYS=3
PANOPATH="/var/www/html/apt-panopticon/apt-panopticon"

rm -R ${PANOPATH}/results_$(date -d "${NUMDAYS} days ago" "+%Y-%m-%d")*

onefang

onefang

2023-05-11 01:46

administrator   ~0000605

Also, to clean up the mess left by failed runs -


find results_* -maxdepth 2 ! -name "pkgmaster.devuan.org" -name "*.*" -type d -print0 | xargs -0 /bin/rm -fr
onefang

onefang

2023-05-11 06:07

administrator   ~0000606

Cleaned up a few other things to, didn't use snork's code though.

Issue History

Date Modified Username Field Change
2022-10-14 00:45 onefang New Issue
2022-10-14 00:45 onefang Status new => assigned
2022-10-14 00:45 onefang Assigned To => onefang
2022-10-14 01:13 onefang Relationship added related to 0000446
2022-10-14 01:14 onefang Priority normal => urgent
2023-05-09 20:32 onefang Note Added: 0000604
2023-05-11 01:46 onefang Note Added: 0000605
2023-05-11 06:07 onefang Status assigned => resolved
2023-05-11 06:07 onefang Resolution open => fixed
2023-05-11 06:07 onefang Fixed in Version => 0.1
2023-05-11 06:07 onefang Note Added: 0000606