Compare commits

..

11 Commits

View File

@@ -14,6 +14,9 @@
set -o nounset set -o nounset
set -o pipefail set -o pipefail
# Prevent failures when not battery present
shopt -s nullglob
for battery in /sys/class/power_supply/*/capacity ; do for battery in /sys/class/power_supply/*/capacity ; do
capacity="$(< "$battery")" capacity="$(< "$battery")"
if (( "${capacity}" < 40 )) ; then if (( "${capacity}" < 40 )) ; then
@@ -186,7 +189,7 @@
restic \ restic \
--cache-dir=/var/cache/restic/ \ --cache-dir=/var/cache/restic/ \
--repo="b2:${BUCKET_NAME}:backup" \ --repo="b2:${BUCKET_NAME}:hera" \
--password-file=/etc/restic/repopassword \ --password-file=/etc/restic/repopassword \
--verbose \ --verbose \
"${@}" "${@}"
@@ -219,7 +222,7 @@
run forget restic-cmd \ run forget restic-cmd \
forget \ forget \
--prune --prune \
--keep-daily 30 \ --keep-daily 30 \
--keep-monthly 12 \ --keep-monthly 12 \
--keep-yearly 3 --keep-yearly 3