Skip to content

Commit 40df621

Browse files
authored
Merge pull request #72 from ikifar2012/dev
Switch to `bashio::config.has_value`
2 parents b6f76a2 + 90051b9 commit 40df621

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

remote-backup/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# 2022.9.3
2+
3+
- Switch to `bashio::config.has_value` to fix #70
4+
5+
**Full Changelog**: https://github.com/ikifar2012/remote-backup-addon/compare/2022.9.2...2022.9.3
6+
17
# 2022.9.2
28

39
- Fix password check #69
410

511
**Full Changelog**: https://github.com/ikifar2012/remote-backup-addon/compare/2022.9.1...2022.9.2
12+
613
# 2022.9.1
714

815
- Backup password fix #68

remote-backup/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Remote Backup
2-
version: "2022.9.2"
2+
version: "2022.9.3"
33
slug: remote_backup
44
description: Automatically create and transfer HA backups using SFTP (SCP), rsync, or rclone (experimental)
55
image: ikifar/remote-backup-{arch}

remote-backup/run.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function fire-event {
2828
local -r result=${1}
2929
local message=${2:-}
3030

31-
if bashio::var.has_value "${message}"; then
31+
if bashio::config.has_value "${message}"; then
3232
message=",\"message:\":\"${message}\""
3333
fi
3434

@@ -106,19 +106,19 @@ function create-local-backup {
106106
bashio::log.warning "No password set, creating a local backup without password."
107107
local data="{\"name\":\"${BACKUP_NAME}\"}"
108108
fi
109-
if bashio::var.has_value "${backup_exclude_addons}" || bashio::var.has_value "${backup_exclude_folders}"; then
109+
if bashio::config.has_value "backup_exclude_addons" || bashio::config.has_value "backup_exclude_folders"; then
110110
bashio::log.info "Creating partial backup: \"${BACKUP_NAME}\""
111111

112112
local unformatted_folders="${base_folders}"
113113
local unformatted_addons=$(bashio::supervisor.addons)
114114

115-
if bashio::var.has_value "${backup_exclude_folders}"; then
115+
if bashio::config.has_value "backup_exclude_folders"; then
116116
bashio::log.notice "Excluded folder(s):\n${backup_exclude_folders}"
117117
for folder in ${backup_exclude_folders} ; do
118118
unformatted_folders="${unformatted_folders[@]/$folder}"
119119
done
120120
fi
121-
if bashio::var.has_value "${backup_exclude_addons}"; then
121+
if bashio::config.has_value "backup_exclude_addons"; then
122122
bashio::log.notice "Excluded addon(s):\n${backup_exclude_addons}"
123123
for addon in ${backup_exclude_addons} ; do
124124
unformatted_addons="${unformatted_addons[@]/$addon}"
@@ -190,7 +190,7 @@ function rsync-folders {
190190

191191
local -r rsync_exclude=$(bashio::config "rsync_exclude" "")
192192
echo "${rsync_exclude}" > /tmp/rsync_exclude.txt
193-
if bashio::var.has_value "rsync_exclude"; then
193+
if bashio::config.has_value "rsync_exclude"; then
194194
bashio::log.notice "Excluded rsync file patterns:\n${rsync_exclude}"
195195
fi
196196

0 commit comments

Comments
 (0)