aboutsummaryrefslogtreecommitdiff
path: root/duply/scripts/duplicity/duply_common.sh
blob: 0a55b64a414da6e2d04f93d79405732c4d6d1a95 (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
JSON_CONF=$(mktemp)
cleanup() {
    rm -f "${JSON_CONF}"
}
trap cleanup INT TERM EXIT

function gpg_export_if_needed {
    echo "Prevent GPG keys for beeing exported"
}

# Override the read command with zenity
read() {
  if command -v zenity &> /dev/null
  then
    eval $2=$(zenity --password)
  else
    command read $*
  fi
}
. ~/.config/ovh/duplicity-$(whoami).sh

#Generate the configuration
~/scripts/duplicity/gen_config_remote.sh "${JSON_CONF}"

TARGET="multi:${JSON_CONF}?mode=mirror&onfail=continue"