mirror of
https://github.com/lancachenet/monolithic
synced 2024-11-24 13:03:03 +00:00
Added scripts to handle chunk processing
Scripts added to /scripts to allow chunk processing findchunk.sh docker exec <container> /scripts/findchunk.sh <chunk> Returns internal paths of files related to that chunk deletechunk.sh docker exec <container> /scripts/findchunk.sh <chunk> Deletes files related to that chunk
This commit is contained in:
parent
8392ba6613
commit
ee622fe875
2 changed files with 17 additions and 0 deletions
12
overlay/scripts/deletechunk.sh
Normal file
12
overlay/scripts/deletechunk.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /data/cache
|
||||||
|
|
||||||
|
if [[ "x$1" == "x" ]]; then
|
||||||
|
echo "Usage: docker exec <container_name> /scripts/deletechunk.sh <chunk path>"
|
||||||
|
echo ""
|
||||||
|
echo "container is usually lancache_monolithic_1"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
find /data/cache -type f -exec awk 'FNR>2 {nextfile} "$1" {rm FILENAME ; nextfile }' '{}' +
|
||||||
|
fi
|
||||||
|
|
5
overlay/scripts/findchunk.sh
Normal file
5
overlay/scripts/findchunk.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd /data/cache
|
||||||
|
|
||||||
|
find /data/cache -type f -exec awk 'FNR>2 {nextfile} "$1" {print FILENAME ; nextfile }' '{}' +
|
Loading…
Reference in a new issue