]>
code.delx.au - monosys/blob - borg/do-install
7 BORG_PASSPHRASE
="$(dd if=/dev/urandom of=/dev/stdout bs=1 count=15 2>/dev/null | base64)"
9 install -m 0755 bsnap backup
/usr
/local
/bin
/
10 install -m 0644 -T etc-borg-exclude
/etc
/borg-exclude
11 install -m 0600 -T etc-borg-env
/etc
/borg-env
12 sed -i "s|SECRET|$BORG_PASSPHRASE|" /etc
/borg-env
14 install -m 0644 -T etc-cron.d-backup
/etc
/cron.d
/backup
15 H
=$
((16#$(hostname|md5sum|head -c 1) % 7 + 14))
16 M
=$
((16#$(hostname|md5sum|head -c 2) % 60))
17 sed -i -e "s|\$H|$H|" -e "s|\$M|$M|" /etc
/cron.d
/backup
19 [ -f /root
/.ssh
/id_rsa.pub
] || ssh-keygen
20 cat /root
/.ssh
/id_rsa.pub
21 install -m 0600 -T root-ssh-config
/root
/.ssh
/config