Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions pethublocal/rootfs/etc/services.d/pethublocal/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ declare password
username="$(bashio::config 'username')"
password="$(bashio::config 'password')"

bashio::log.info "Username ${username}"
bashio::log.info "Password ${password}"
if ! bashio::config.has_value "username"; then
bashio::log.warning "Sure Petcare username is not configured"
fi

if ! bashio::config.has_value "password"; then
bashio::log.warning "Sure Petcare password is not configured"
fi

bashio::log.info "Starting Pet Hub Local with configured Sure Petcare credentials"

cd /share/pethublocal || bashio::exit.nok "Failed to change to Pet Hub Local working directory"
exec pethublocal addon -u "${username}" -p "${password}"
exec pethublocal addon -u "${username}" -p "${password}"