Skip to content

Commit

Permalink
Added cron based cleanup automation for /downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
h8pewou authored Apr 17, 2021
1 parent 4de5003 commit d46ea33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get install -y tzdata
ENV TZ "UTC"
RUN echo "UTC" > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
RUN apt-get install -y git wget python ffmpeg curl apache2 php libapache2-mod-php php-mysql php-xml php-zip php-gd
RUN apt-get install -y git wget python cron ffmpeg curl apache2 php libapache2-mod-php php-mysql php-xml php-zip php-gd
RUN wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/bin/youtube-dl
RUN chmod a+rx /usr/bin/youtube-dl
RUN rm -f /etc/localtime
Expand All @@ -20,6 +20,8 @@ RUN rm -rf /var/www/html/*
RUN cd /tmp; git clone https://github.com/codepoet80/metube-php-servicewrapper
RUN mv /tmp/metube-php-servicewrapper/* /var/www/html/
RUN wget https://raw.githubusercontent.com/h8pewou/legacy_webos/main/metube-webos-config.php -O /var/www/html/config.php
RUN echo "find /downloads -amin +60 -exec rm -f {} \;" > /etc/cron.hourly/youtube-cleanup
RUN chmod a+rx /etc/cron.hourly/youtube-cleanup

# Configure apache

Expand Down

0 comments on commit d46ea33

Please sign in to comment.