Skip to content

Commit

Permalink
clean up old OpenSkyDB files on container start
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Apr 21, 2023
1 parent c417e9a commit fb1541e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rootfs/etc/cont-init.d/50-get-openskydb
Expand Up @@ -6,12 +6,15 @@ APPNAME="$(hostname)/get-openskydb"
# Copyright 2020-2022 Ramon F. Kolb - licensed under the terms and conditions
# of GPLv3. The terms and conditions of this license are included with the Github
# distribution of this package, and are also available here:
# https://github.com/kx1t/planefence4docker/
# https://github.com/kx1t/docker-planefence/
#
# This package may incorporate other software and license terms.
# -----------------------------------------------------------------------------------
#

# Cleanup all but the newest OpenSkyDB file
find /usr/share/planefence/html/ -type f -name "OpenSky*.csv" -printf '%T@ %p\n'| sort -g | head -n -1 | cut -d ' ' -f 2 | xargs rm -f

echo "[$(date)][$APPNAME] OpenSky DB checking has been temporarily disabled."
exit 0

Expand Down

0 comments on commit fb1541e

Please sign in to comment.