RUN apt -y --no-install-recommends install openssh-server rsyslog
RUN apt -y --no-install-recommends install wine libwine wine64
RUN apt -y --no-install-recommends install pdfposter rename
+RUN apt -y --no-install-recommends install jdupes
RUN apt -y --no-install-recommends install locales
RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \
RUN apt -y --no-install-recommends install openssh-server rsyslog
RUN apt -y --no-install-recommends install wine libwine wine64
RUN apt -y --no-install-recommends install pdfposter rename
+RUN apt -y --no-install-recommends install jdupes
RUN apt -y --no-install-recommends install locales
RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \
$schedule->command('job:dispatchNow Maintenance\\\\CheckPublicationsHashAndCid')->dailyAt('3:00');
$schedule->command('job:dispatchNow Maintenance\\\\CleanDownloads')->dailyAt('4:00');
$schedule->command('job:dispatchNow Maintenance\\\\CleanFTP')->dailyAt('4:30');
+ $schedule->command('job:dispatchNow Maintenance\\\\RemoveDuplicates')->monthly();
// WS to Toolbox migration
$schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00');
$schedule->command('ws:migrate --publications=missing --documents=missing')->hourly();
--- /dev/null
+<?php
+
+namespace App\Jobs\Maintenance;
+
+use App\Jobs\Base;
+use Cubist\Util\CommandLine;
+
+class RemoveDuplicates extends Base
+{
+ public function handle()
+ {
+ $directories = [protected_path('fluidbookpublication/working'), protected_path('fluidbookpublication/pdf')];
+ foreach ($directories as $directory) {
+ $jdupes = new CommandLine('/usr/bin/jdupes');
+ $jdupes->setArg('l');
+ $jdupes->setArg('r');
+ $jdupes->setArg(null, $directory);
+ $jdupes->execute();
+ }
+ }
+}