mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
🔨 Use new Bashio service availablity checks
This commit is contained in:
parent
7d6f06ef34
commit
3309ec1baf
2 changed files with 4 additions and 8 deletions
|
@ -8,8 +8,8 @@ declare password
|
|||
declare port
|
||||
declare username
|
||||
|
||||
host=$(bashio::services "mqtt" "host")
|
||||
if bashio::var.has_value "${host}"; then
|
||||
if bashio::services.available "mqtt"; then
|
||||
host=$(bashio::services "mqtt" "host")
|
||||
password=$(bashio::services "mqtt" "password")
|
||||
port=$(bashio::services "mqtt" "port")
|
||||
username=$(bashio::services "mqtt" "username")
|
||||
|
@ -24,6 +24,4 @@ if bashio::var.has_value "${host}"; then
|
|||
|
||||
ln -s /root/.config/mosquitto_sub /root/.config/mosquitto_pub
|
||||
ln -s /root/.config/mosquitto_sub /root/.config/mosquitto_rr
|
||||
else
|
||||
bashio::log.info "The above error can be ignored if you don't have Mosquitto installed"
|
||||
fi
|
||||
|
|
|
@ -8,8 +8,8 @@ declare password
|
|||
declare port
|
||||
declare username
|
||||
|
||||
host=$(bashio::services "mysql" "host")
|
||||
if bashio::var.has_value "${host}"; then
|
||||
if bashio::services.available "mysql"; then
|
||||
host=$(bashio::services "mysql" "host")
|
||||
password=$(bashio::services "mysql" "password")
|
||||
port=$(bashio::services "mysql" "port")
|
||||
username=$(bashio::services "mysql" "username")
|
||||
|
@ -22,6 +22,4 @@ if bashio::var.has_value "${host}"; then
|
|||
echo "port=${port}"
|
||||
echo "user=\"${username}\""
|
||||
} > /etc/mysql/conf.d/service.cnf
|
||||
else
|
||||
bashio::log.info "The above error can be ignored if you don't have MariaDB installed"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue