blob: 1364367d563a4bfef901c4f8d33a5264eb6579de (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
rdiff_wizard() {
require_packages rdiff-backup
startForm "rdiff action wizard"
formItem "keep" "60D"
formItem "dest_directory" "/backups/mybackup"
formItem "dest_host" "backuphost"
formItem "dest_user" "backupuser"
displayForm
[ $? = 1 ] && return;
set -- $REPLY
keep=$1
directory=$2
host=$3
user=$4
startForm "rdiff action wizard: includes"
formItem include /var/spool/cron/crontabs
formItem include /var/backups
formItem include /etc
formItem include /root
formItem include /home
formItem include /usr/local/__star__bin
formItem include /var/lib/dpkg/status__star__
formItem include
formItem include
formItem include
displayForm
[ $? = 1 ] && return;
includes=
for i in $REPLY; do
[ "$i" != "_empty_" ] && includes="$includes\ninclude = $i"
done
startForm "rdiff action wizard: excludes"
formItem exclude /home/__star__/.gnupg
formItem exclude
formItem exclude
displayForm
[ $? = 1 ] && return;
excludes=
for i in $REPLY; do
[ "$i" != "_empty_" ] && excludes="$excludes\nexclude = $i"
done
get_next_filename $configdirectory/90.rdiff
cat > $next_filename <<EOF
[source]
type = local
keep = $keep
EOF
echo -e $includes >> $next_filename
echo -e $excludes >> $next_filename
cat >> $next_filename <<EOF
[dest]
type = remote
directory = $directory
host = $host
user = $user
EOF
chmod 000 $next_filename
}
|