mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-07 04:31:24 +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 port
|
||||||
declare username
|
declare username
|
||||||
|
|
||||||
host=$(bashio::services "mqtt" "host")
|
if bashio::services.available "mqtt"; then
|
||||||
if bashio::var.has_value "${host}"; then
|
host=$(bashio::services "mqtt" "host")
|
||||||
password=$(bashio::services "mqtt" "password")
|
password=$(bashio::services "mqtt" "password")
|
||||||
port=$(bashio::services "mqtt" "port")
|
port=$(bashio::services "mqtt" "port")
|
||||||
username=$(bashio::services "mqtt" "username")
|
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_pub
|
||||||
ln -s /root/.config/mosquitto_sub /root/.config/mosquitto_rr
|
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
|
fi
|
||||||
|
|
|
@ -8,8 +8,8 @@ declare password
|
||||||
declare port
|
declare port
|
||||||
declare username
|
declare username
|
||||||
|
|
||||||
host=$(bashio::services "mysql" "host")
|
if bashio::services.available "mysql"; then
|
||||||
if bashio::var.has_value "${host}"; then
|
host=$(bashio::services "mysql" "host")
|
||||||
password=$(bashio::services "mysql" "password")
|
password=$(bashio::services "mysql" "password")
|
||||||
port=$(bashio::services "mysql" "port")
|
port=$(bashio::services "mysql" "port")
|
||||||
username=$(bashio::services "mysql" "username")
|
username=$(bashio::services "mysql" "username")
|
||||||
|
@ -22,6 +22,4 @@ if bashio::var.has_value "${host}"; then
|
||||||
echo "port=${port}"
|
echo "port=${port}"
|
||||||
echo "user=\"${username}\""
|
echo "user=\"${username}\""
|
||||||
} > /etc/mysql/conf.d/service.cnf
|
} > /etc/mysql/conf.d/service.cnf
|
||||||
else
|
|
||||||
bashio::log.info "The above error can be ignored if you don't have MariaDB installed"
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue