mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-07 04:31:24 +00:00
parent
c9b13cd8ec
commit
9ff2bb6306
1 changed files with 28 additions and 28 deletions
|
@ -1,28 +1,28 @@
|
||||||
#!/command/with-contenv bashio
|
#!/command/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Home Assistant Community Add-on: Studio Code Server
|
# Home Assistant Community Add-on: Studio Code Server
|
||||||
# Pre-configures the Mosquitto clients, if the service is available
|
# Pre-configures the Mosquitto clients, if the service is available
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
declare host
|
declare host
|
||||||
declare password
|
declare password
|
||||||
declare port
|
declare port
|
||||||
declare username
|
declare username
|
||||||
|
|
||||||
if bashio::services.available "mqtt"; then
|
if bashio::services.available "mqtt"; then
|
||||||
host=$(bashio::services "mqtt" "host")
|
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")
|
||||||
|
|
||||||
mkdir -p /root/.config
|
mkdir -p /root/.config
|
||||||
{
|
{
|
||||||
echo "-h ${host}"
|
echo "-h ${host}"
|
||||||
echo "--pw ${password}"
|
echo "--pw ${password}"
|
||||||
echo "--port ${port}"
|
echo "--port ${port}"
|
||||||
echo "--username ${username}"
|
echo "--username ${username}"
|
||||||
} >/root/.config/mosquitto_sub
|
} >/root/.config/mosquitto_sub
|
||||||
|
|
||||||
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
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue