From 3e87c843820978f346bdcb1ca211634667a29d9d Mon Sep 17 00:00:00 2001 From: Josh Willox Date: Mon, 10 Jun 2024 14:13:22 +1000 Subject: [PATCH] feat: support new `homeassistant` directory * remains backwards compatible with `/config` directory --- README.md | 2 +- rclone_backup/DOCS.md | 2 +- rclone_backup/config.yaml | 2 +- rclone_backup/rootfs/etc/cont-init.d/init.sh | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 73e485d..6ab040a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ jobs: flags: drive-use-trash: false dry_run: false -config_path: /config/rclone.conf +config_path: /homeassistant/rclone.conf ``` ## Providers diff --git a/rclone_backup/DOCS.md b/rclone_backup/DOCS.md index f8175d4..d9b9206 100644 --- a/rclone_backup/DOCS.md +++ b/rclone_backup/DOCS.md @@ -15,7 +15,7 @@ jobs: exclude: [] flags: {} dry_run: false -config_path: /config/rclone.conf +config_path: /homeassistant/rclone.conf ``` ## Configuration diff --git a/rclone_backup/config.yaml b/rclone_backup/config.yaml index 1235a72..d037eb7 100644 --- a/rclone_backup/config.yaml +++ b/rclone_backup/config.yaml @@ -36,7 +36,7 @@ options: exclude: [] flags: {} dry_run: true - config_path: "/config/rclone.conf" + config_path: "/homeassistant/rclone.conf" schema: jobs: - name: str? diff --git a/rclone_backup/rootfs/etc/cont-init.d/init.sh b/rclone_backup/rootfs/etc/cont-init.d/init.sh index 3436ea3..29cafe4 100755 --- a/rclone_backup/rootfs/etc/cont-init.d/init.sh +++ b/rclone_backup/rootfs/etc/cont-init.d/init.sh @@ -1,6 +1,10 @@ #!/usr/bin/with-contenv bashio -CONFIG_PATH="/config/rclone.conf" +CONFIG_PATH="/homeassistant/rclone.conf" + +# backwards compatible with config directory +ln -s "/homeassistant" "/config" \ + || bashio::log.warning "Failed linking common directory: /config" if bashio::config.has_value "rclone_config"; then # write rclone config from addon config