adding validated services? patching forcad_local.py
This commit is contained in:
11
ctfcup24-school-ad/services/filtranator/cleaner/Dockerfile
Normal file
11
ctfcup24-school-ad/services/filtranator/cleaner/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN useradd --no-create-home --shell /bin/false --uid 1000 --user-group cleaner
|
||||
|
||||
COPY cleaner.sh /var/cleaner.sh
|
||||
|
||||
RUN chmod +x /var/cleaner.sh
|
||||
|
||||
RUN mkdir /tmp/data
|
||||
|
||||
ENTRYPOINT ["/var/cleaner.sh"]
|
||||
13
ctfcup24-school-ad/services/filtranator/cleaner/cleaner.sh
Normal file
13
ctfcup24-school-ad/services/filtranator/cleaner/cleaner.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true; do
|
||||
date -uR
|
||||
|
||||
find "/tmp/data/" \
|
||||
-type d \
|
||||
-and -not -path "/tmp/data/" \
|
||||
-and -not -newermt "-900 seconds" \
|
||||
-exec rm -r {} +
|
||||
|
||||
sleep 60
|
||||
done
|
||||
Reference in New Issue
Block a user