mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
Use local variables
This commit is contained in:
parent
b399ac13ad
commit
a3d95ebfb2
@ -85,9 +85,10 @@ function migrate_addon_config_dir() {
|
||||
|
||||
if [[ "${db_path}" == /config/* ]]; then
|
||||
# replace /config/ prefix with /homeassistant_config/
|
||||
old_db_path="/homeassistant_config/${db_path:8}"
|
||||
local old_db_path="/homeassistant_config/${db_path:8}"
|
||||
|
||||
if [[ -f "${old_db_path}" ]]; then
|
||||
local new_db_dir
|
||||
new_db_dir="$(dirname "${db_path}")"
|
||||
echo "[INFO] Migrating database from '${old_db_path}' to '${new_db_dir}' dir..."
|
||||
mv -vf "${old_db_path}"* "${new_db_dir}"
|
||||
|
Loading…
Reference in New Issue
Block a user