test
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: VirtualHere Client
|
name: VirtualHere Client
|
||||||
version: "0.1.318"
|
version: "0.1.319"
|
||||||
slug: vhclient
|
slug: vhclient
|
||||||
description: VirtualHere Client
|
description: VirtualHere Client
|
||||||
arch:
|
arch:
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ options=$(bashio::api.supervisor GET "/addons/self/options/config")
|
|||||||
autofind=$(echo $options | jq '. | if .autofind then true else false end')
|
autofind=$(echo $options | jq '. | if .autofind then true else false end')
|
||||||
autouse=$(echo $options | jq '. | if .autouse then true else false end')
|
autouse=$(echo $options | jq '. | if .autouse then true else false end')
|
||||||
|
|
||||||
if $autofind; then
|
#if $autofind; then
|
||||||
bashio::log.info "Enable AutoFind"
|
# bashio::log.info "Enable AutoFind"
|
||||||
/usr/bin/vh_edit_config General AutoFind 1
|
# /usr/bin/vh_edit_config General AutoFind 1
|
||||||
else
|
#else
|
||||||
bashio::log.info "Disable AutoFind"
|
# bashio::log.info "Disable AutoFind"
|
||||||
/usr/bin/vh_edit_config General AutoFind 0
|
# /usr/bin/vh_edit_config General AutoFind 0
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if $autouse; then
|
if $autouse; then
|
||||||
bashio::log.info "AUTO USE ALL"
|
bashio::log.info "AUTO USE ALL"
|
||||||
@@ -22,11 +22,11 @@ else
|
|||||||
/usr/bin/vhclient -t "STOP USING ALL LOCAL"
|
/usr/bin/vhclient -t "STOP USING ALL LOCAL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if bashio::config.has_value 'clientid'; then
|
#if bashio::config.has_value 'clientid'; then
|
||||||
clientid=($(bashio::config 'clientid'))
|
# clientid=($(bashio::config 'clientid'))
|
||||||
bashio::log.info "Set ClientId to ${clientid}"
|
# bashio::log.info "Set ClientId to ${clientid}"
|
||||||
/usr/bin/vh_edit_config General ClientId ${clientid}
|
# /usr/bin/vh_edit_config General ClientId ${clientid}
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if bashio::config.has_value 'manualhub'; then
|
if bashio::config.has_value 'manualhub'; then
|
||||||
manualhub=($(bashio::config 'manualhub'))
|
manualhub=($(bashio::config 'manualhub'))
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
#!/command/with-contenv bashio
|
#!/command/with-contenv bashio
|
||||||
|
|
||||||
/usr/bin/vhclient -t "GET CLIENT STATE"
|
options=$(bashio::api.supervisor GET "/addons/self/options/config")
|
||||||
|
autofind=$(echo $options | jq '. | if .autofind then true else false end')
|
||||||
|
|
||||||
bashio::log.info "Waiting a bit for vhclient ..."
|
if $autofind; then
|
||||||
sleep 5s
|
bashio::log.info "Enable AutoFind"
|
||||||
|
/usr/bin/vh_edit_config General AutoFind 1
|
||||||
|
else
|
||||||
|
bashio::log.info "Disable AutoFind"
|
||||||
|
/usr/bin/vh_edit_config General AutoFind 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if bashio::config.has_value 'clientid'; then
|
||||||
|
clientid=($(bashio::config 'clientid'))
|
||||||
|
bashio::log.info "Set ClientId to ${clientid}"
|
||||||
|
/usr/bin/vh_edit_config General ClientId ${clientid}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#bashio::log.info "Waiting a bit for vhclient ..."
|
||||||
|
#sleep 5s
|
||||||
|
#/usr/bin/vhclient -t "GET CLIENT STATE"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/command/with-contenv bashio
|
#!/command/with-contenv bashio
|
||||||
/sbin/modprobe -s vhci-hcd
|
/sbin/modprobe -s vhci-hcd
|
||||||
mount -o remount -t sysfs sysfs /sys
|
mount -o remount -t sysfs sysfs /sys
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bashio
|
|
||||||
# ==============================================================================
|
|
||||||
# Take down the S6 supervision tree when example fails
|
|
||||||
# s6-overlay docs: https://github.com/just-containers/s6-overlay
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
declare APP_EXIT_CODE=${1}
|
|
||||||
|
|
||||||
if [[ "${APP_EXIT_CODE}" -ne 0 ]] && [[ "${APP_EXIT_CODE}" -ne 256 ]]; then
|
|
||||||
bashio::log.warning "Halt add-on with exit code ${APP_EXIT_CODE}"
|
|
||||||
echo "${APP_EXIT_CODE}" > /run/s6-linux-init-container-results/exitcode
|
|
||||||
exec /run/s6/basedir/bin/halt
|
|
||||||
fi
|
|
||||||
|
|
||||||
bashio::log.info "Service restart after closing"
|
|
||||||
Reference in New Issue
Block a user