Skip to content

Commit

Permalink
Backup password fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ikifar2012 committed Sep 13, 2022
1 parent 9a0432e commit c2f495e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions remote-backup/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ function create-local-backup {
local -r backup_exclude_folders=$(bashio::config "backup_exclude_folders")
local -r backup_exclude_addons=$(bashio::config "backup_exclude_addons")
local -r base_folders="addons/local homeassistant media share ssl"
local data="{\"name\":\"${BACKUP_NAME}\", \"password\": \"$(bashio::config 'backup_password' '')\"}"

local -r backup_password=$(bashio::config "backup_password")
if bashio::config.has_value "${backup_password}"; then
bashio::log.info "Creating local backup with password."
local data="{\"name\":\"${BACKUP_NAME}\", \"password\": \"${backup_password}\"}"
else
bashio::log.warning "No password set, creating a local backup without password."
local data="{\"name\":\"${BACKUP_NAME}\"}"
fi
if bashio::var.has_value "${backup_exclude_addons}" || bashio::var.has_value "${backup_exclude_folders}"; then
bashio::log.info "Creating partial backup: \"${BACKUP_NAME}\""

Expand Down

0 comments on commit c2f495e

Please sign in to comment.