mirror of
https://github.com/BastilleBSD/bastille.git
synced 2025-12-11 17:39:52 +01:00
migrate: Add config var if not present in bastille.conf
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user