From 31dd1c2c78e5bdb41b1112f7a3128578a3f6a30c Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 9 Mar 2025 15:18:16 -0300 Subject: [PATCH] Align some terms --- docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run | 10 +++++----- docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run index e66fa4021..dddde74cd 100755 --- a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +++ b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run @@ -26,16 +26,16 @@ function migrate_db_from_media_to_config() { user_db_path=$(yq eval '.database.path' "${config_file}") if [[ "${user_db_path}" == "null" ]]; then - local previous_db_path="/media/frigate/frigate.db" + local old_db_path="/media/frigate/frigate.db" local new_db_dir="/config" - if [[ -f "${previous_db_path}" ]]; then + if [[ -f "${old_db_path}" ]]; then if mountpoint --quiet "${new_db_dir}"; then # /config is a mount point, move the db - echo "[INFO] Moving db from '${previous_db_path}' to the '${new_db_dir}' dir..." + echo "[INFO] Migrating database from '${old_db_path}' to '${new_db_dir}' dir..." # Move all files that starts with frigate.db to the new directory - mv -vf "${previous_db_path}"* "${new_db_dir}" + mv -vf "${old_db_path}"* "${new_db_dir}" else - echo "[ERROR] Trying to migrate the db path from '${previous_db_path}' to the '${new_db_dir}' dir, but '${new_db_dir}' is not a mountpoint, please mount the '${new_db_dir}' dir" + echo "[ERROR] Trying to migrate the database path from '${old_db_path}' to '${new_db_dir}' dir, but '${new_db_dir}' is not a mountpoint, please mount the '${new_db_dir}' dir" return 1 fi fi diff --git a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run index eaff55ef8..7a2c0121d 100755 --- a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run +++ b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run @@ -89,7 +89,7 @@ function migrate_from_homeassistant_config() { if [[ -f "${old_db_path}" ]]; then new_db_dir="$(dirname "${db_path}")" - echo "[INFO] Migrating database from '${old_db_path}' to '${db_path}'..." + echo "[INFO] Migrating database from '${old_db_path}' to '${new_db_dir}' dir..." mv -vf "${old_db_path}"* "${new_db_dir}" fi fi