
Ignore-this: c8770ab7e0b8cab7478cd91231c24dd8 darcs-hash:20130126184831-3a55a-be310f9743a6c9298845f6ab2c2dcb96d0765079.gz
14 lines
487 B
Bash
Executable file
14 lines
487 B
Bash
Executable file
#!/bin/sh
|
|
OLDFILE="/usr/scripts/var/copyrighted-content.old"
|
|
NEWFILE="/usr/scripts/var/copyrighted-content.new"
|
|
EXTS="\(avi\|flv\|mkv\|mp3\|mp4\|nzb\|pdf\|rar\|srt\|wmv\|zip\|iso\|bin\|cue\)"
|
|
|
|
mv "$NEWFILE" "$OLDFILE"
|
|
|
|
touch "$NEWFILE"
|
|
chmod 600 "$NEWFILE"
|
|
chown root:root "$NEWFILE"
|
|
|
|
find /home-adh/ -ignore_readdir_race -type f -regex ".*\.$EXTS" | sort >> $NEWFILE
|
|
|
|
diff -U 0 "$OLDFILE" "$NEWFILE" | mail -s "Detection des fichiers potentiellement copyrightes" bureau@lists.crans.org
|