23 lines
464 B
Plaintext
23 lines
464 B
Plaintext
|
#!/bin/bash
|
||
|
if [ "${UID}" -ne "0" ]; then
|
||
|
echo "Keine Rootrechte."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if [ -f /etc/btrbk/btrbk.conf ]; then
|
||
|
cfg="/etc/btrbk/btrbk.conf"
|
||
|
else
|
||
|
cfg="/etc/btrbk/btrbk.conf.system"
|
||
|
fi
|
||
|
|
||
|
if mountpoint -q /var/lib/backup/quelle/bootfs; then
|
||
|
snapshotbootfs="snapshotbootfs"
|
||
|
fi
|
||
|
for s in snapshotrootfs "${snapshotbootfs}"; do
|
||
|
test "${s}" && btrbk --config="${cfg}" --quiet run "${s}"
|
||
|
done
|
||
|
|
||
|
if ! sudo update-grub 2> /dev/null; then
|
||
|
echo update-grub failed
|
||
|
fi
|