Commit 2df84e34 authored by bertagaz's avatar bertagaz
Browse files

KeepassX: Ensure we run it anyway if the user doesn't want to rename the DB.

Refs: #12375
parent 56e5fa13
......@@ -39,14 +39,13 @@ elif mountpoint -q "$PERSISTENT_DATA_DIR" && \
! [ -e "${NEW_DB}" ] && \
[ "$(find "$PERSISTENT_DATA_DIR" -maxdepth 1 -name '*.kdbx' 2>/dev/null | wc -l)" = "1" ]; then
user_db="$(find "$PERSISTENT_DATA_DIR" -maxdepth 1 -name '*.kdbx' 2>/dev/null)"
if ! [ -e "${PERSISTENT_DATA_DIR}/.no_keepassx_db_renaming" ]; then
if prompt_for_database_renaming "${user_db}"; then
mv "${user_db}" "${NEW_DB}"
exec /usr/bin/keepassx "${NEW_DB}"
else
touch "${PERSISTENT_DATA_DIR}/.no_keepassx_db_renaming"
exec /usr/bin/keepassx "${user_db}"
fi
if ! [ -e "${PERSISTENT_DATA_DIR}/.no_keepassx_db_renaming" ] \
&& prompt_for_database_renaming "${user_db}"; then
mv "${user_db}" "${NEW_DB}"
exec /usr/bin/keepassx "${NEW_DB}"
else
touch "${PERSISTENT_DATA_DIR}/.no_keepassx_db_renaming"
exec /usr/bin/keepassx
fi
# There's an old DB but no new one => import the old DB:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment