diff --git a/usr/local/share/bastille/migrate.sh b/usr/local/share/bastille/migrate.sh index 19565471..f5d8b232 100644 --- a/usr/local/share/bastille/migrate.sh +++ b/usr/local/share/bastille/migrate.sh @@ -133,8 +133,11 @@ migrate_create_export() { # Ensure migrate directory is in place ## ${bastille_migratedir} if [ -z "${bastille_migratedir}" ]; then - error_notify "[ERROR]: No migrate directory found." - error_exit "Did you diff the config file?" + if ! grep -oq "bastille_migratedir=" "${BASTILLE_CONFIG}"; then + sed -i '' 's|bastille_backupsdir=.*|&\nbastille_migratedir=\"${bastille_prefix}/migrate\" ## default: \"${bastille_prefix}/migrate\"|' ${BASTILLE_CONFIG} + # shellcheck disable=SC1090 + . ${BASTILLE_CONFIG} + fi fi if [ ! -d "${bastille_migratedir}" ]; then if checkyesno bastille_zfs_enable; then