blob: c27a9ffe6fb5ad96d8d1fd14b16535281aa04f74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
#
# Move files from DVB-Computer(s) to localmachine into $LOCALDIR
#
LOCALDIR=/x1/video
if [ ! "$UID" = 0 ]; then
if [ -d "$1" ]; then
if [ -f "$1/index.vdr" ]; then
cd $LOCALDIR
recdir=`echo "$1" | cut -d / -f4-`
mkdir -p "$recdir"
cd "$recdir"
dvbcomp=`echo "$1" | cut -d / -f2`
(echo cd "/video/video0/$recdir"; echo mget \*)| ftp -i $dvbcomp
cd $LOCALDIR
ssh $dvbcomp ls -Ls /video/video0/$recdir > /tmp/dvb
ls -Ls $recdir > /tmp/local
diff -u /tmp/dvb /tmp/local &> /dev/null && rm -rfv /$dvbcomp/video?/$recdir
rm /tmp/dvb
rm /tmp/local
rmdir --ignore-fail-on-non-empty `find /$dvbcomp/video?/ -type d -mindepth 1 | cut -d \/ -f-4 | grep -v temp | sort | uniq`
fi
fi
else
echo Not as root
fi
/usr/local/bin/my/process_summary.pl
|