adjust backup script for new locations
This commit is contained in:
parent
492c83cf54
commit
b48c2af6b6
1 changed files with 3 additions and 10 deletions
13
bin/backup
13
bin/backup
|
@ -1,14 +1,7 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
if [ -e /Volumes ]; then
|
|
||||||
SHACHECK="2688057d3ddc1b9b5a5a4309f89a2bcb57cc033b /Volumes/Duplicity/mountcheck"
|
|
||||||
if ! ( echo "${SHACHECK}" | shasum -cs ); then
|
|
||||||
echo "/Volumes/Duplicity does not seem to be mounted or wrong volume"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
CMD=${1:-backup}
|
CMD=${1:-backup}
|
||||||
|
HOSTNAME=$(hostname -s)
|
||||||
|
|
||||||
exec vault2env /secret/private/duplicity/$(hostname -s) -- \
|
exec vault2env /secret/private/duplicity/${HOSTNAME} -- \
|
||||||
duplicity-backup ${CMD}
|
duplicity-backup -f ${HOME}/.duplicity/${HOSTNAME}.yaml ${CMD}
|
||||||
|
|
Loading…
Reference in a new issue