mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-06 05:27:44 +03:00
Fix homeassistant config path
This commit is contained in:
parent
7ccf3fc265
commit
e7954fbd89
@ -51,7 +51,7 @@ function set_libva_version() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function migrate_addon_config_dir() {
|
function migrate_addon_config_dir() {
|
||||||
if ! mountpoint --quiet /homeassistant_config; then
|
if ! mountpoint --quiet /homeassistant; then
|
||||||
# Not running as a Home Assistant add-on
|
# Not running as a Home Assistant add-on
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -64,7 +64,7 @@ function migrate_addon_config_dir() {
|
|||||||
fi
|
fi
|
||||||
unset new_config_file new_config_file_yaml
|
unset new_config_file new_config_file_yaml
|
||||||
|
|
||||||
local old_config_file="/homeassistant_config/frigate.yml"
|
local old_config_file="/homeassistant/frigate.yml"
|
||||||
local old_config_file_yaml="${old_config_file//.yml/.yaml}"
|
local old_config_file_yaml="${old_config_file//.yml/.yaml}"
|
||||||
local new_config_file="/config/config.yml"
|
local new_config_file="/config/config.yml"
|
||||||
if [[ -f "${old_config_file_yaml}" ]]; then
|
if [[ -f "${old_config_file_yaml}" ]]; then
|
||||||
@ -82,8 +82,8 @@ function migrate_addon_config_dir() {
|
|||||||
db_path="/config/frigate.db"
|
db_path="/config/frigate.db"
|
||||||
fi
|
fi
|
||||||
if [[ "${db_path}" == /config/* ]]; then
|
if [[ "${db_path}" == /config/* ]]; then
|
||||||
# replace /config/ prefix with /homeassistant_config/
|
# replace /config/ prefix with /homeassistant/
|
||||||
local old_db_path="/homeassistant_config/${db_path:8}"
|
local old_db_path="/homeassistant/${db_path:8}"
|
||||||
|
|
||||||
if [[ -f "${old_db_path}" ]]; then
|
if [[ -f "${old_db_path}" ]]; then
|
||||||
local new_db_dir
|
local new_db_dir
|
||||||
@ -97,8 +97,8 @@ function migrate_addon_config_dir() {
|
|||||||
local model_path
|
local model_path
|
||||||
model_path=$(yq eval '.model.path' "${old_config_file}")
|
model_path=$(yq eval '.model.path' "${old_config_file}")
|
||||||
if [[ "${model_path}" == /config/* ]]; then
|
if [[ "${model_path}" == /config/* ]]; then
|
||||||
# replace /config/ prefix with /homeassistant_config/
|
# replace /config/ prefix with /homeassistant/
|
||||||
local old_model_path="/homeassistant_config/${model_path:8}"
|
local old_model_path="/homeassistant/${model_path:8}"
|
||||||
|
|
||||||
if [[ -f "${old_model_path}" ]]; then
|
if [[ -f "${old_model_path}" ]]; then
|
||||||
local new_model_dir
|
local new_model_dir
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user