1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#!/bin/sh
set -e
# Upstream provides a config file migration tool, so let's save the
# user time by running it. Notably, it highlights deprecated config
# keys and introduces their replacements in a commented-out state.
if [ "$1" = "configure" ]; then
if find /etc/borgmatic -maxdepth 1 -type f -name "*.yaml" -print -quit | grep -q .; then
for i in /etc/borgmatic/*.yaml; do
borgmatic config generate --source "$i" --destination "$i.dpkg-dist" \
|| echo "WARNING: Failed to migrate $i to $i.dpkg-dist"
done
fi
fi
#DEBHELPER#
|