fetch-work-pcfritz 1.69 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

TASKS=/opt/LYSrdiff/var/tasks
NT=$TASKS.tmp

rm -f $NT

echo samuel root samuel / >> $NT
echo samuel boot samuel /boot >> $NT
echo samuel var samuel /var >> $NT
echo samuel usr samuel /usr >> $NT
echo samuel opt samuel /opt >> $NT

SAMUEL=samuel

ssh -i /root/.ssh/backupkey -l root $SAMUEL ls -1 /usr/local/mailman/archives/private \
 | sort \
 | awk '{print "mailman-private", $1, 
	       "samuel /usr/local/mailman/archives/private/" $1}' \
>> $NT

22
23
echo jemima mediawiki jemima /usr/share/mediawiki-stage >> $NT

24
25
echo lea yp lea /var/yp >>$NT

Per Cederqvist's avatar
Per Cederqvist committed
26
27
28
29
30
echo david root david / >> $NT
echo david boot david /boot >> $NT
echo david var david /var >> $NT
echo david usr david /usr >> $NT
echo david opt david /opt >> $NT
31
32
33
34
35
36
37
38
echo benjamin samba benjamin /samba >> $NT
echo benjamin samba-dokument benjamin /samba/shares/Public/Dokument >> $NT
echo benjamin samba-mallar benjamin /samba/shares/Public/Mallar >> $NT
echo benjamin samba-video benjamin /samba/shares/Public/Video >> $NT
echo benjamin samba-ekonomi benjamin /samba/shares/Public/ekonomi >> $NT
echo benjamin samba-installationsmedia benjamin /samba/shares/Public/Installationsmedia >> $NT

ssh -i /root/.ssh/backupkey -l root benjamin \
Per Cederqvist's avatar
Per Cederqvist committed
39
40
41
42
    find /home -maxdepth 1 -mindepth 1 -type d -print \
 | sed 's:.*/::' \
 | sort \
 | awk '{print "home", $1, 
43
	       "benjamin /home/" $1}' \
Per Cederqvist's avatar
Per Cederqvist committed
44
45
>> $NT

46
ssh -i /root/.ssh/backupkey -l root benjamin \
Per Cederqvist's avatar
Per Cederqvist committed
47
48
49
50
    find /samba/profiles -maxdepth 1 -mindepth 1 -type d -print \
 | sed 's:.*/::' \
 | sort \
 | awk '{print "samba-profiles", $1, 
51
	       "benjamin /samba/profiles/" $1}' \
Per Cederqvist's avatar
Per Cederqvist committed
52
53
>> $NT

54
55
56
echo shimon home shimon /home >> $NT
echo shimon wwwdata shimon /var/www >> $NT

Per Cederqvist's avatar
Per Cederqvist committed
57
58
59
60
diff -u $TASKS $NT
echo -n '[CONFIRM] '
read line
mv -f $NT $TASKS