This commit is contained in:
Hans Karlinius
2024-12-03 04:04:53 +01:00
parent f3e3b0325a
commit 9a5858b3e9
5 changed files with 15 additions and 16 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: VirtualHere Client
version: "0.1.337"
version: "0.1.338"
slug: vhclient
description: VirtualHere Client
arch:
@@ -8,35 +8,33 @@ manualhub=$(echo $options | jq -r '.manualhub | tostring')
if $autofind; then
bashio::log.info "Enable General AutoFind"
/usr/bin/vh_edit_config General AutoFind 1
/usr/bin/vh_editini General AutoFind 1
else
bashio::log.info "Disable General AutoFind"
/usr/bin/vh_edit_config General AutoFind 0
/usr/bin/vh_editini General AutoFind 0
fi
if $autouse; then
bashio::log.info "Enable AutoShare All"
/usr/bin/vh_edit_config AutoShare All 1
/usr/bin/vh_editini AutoShare All 1
else
bashio::log.info "Disable AutoShare"
/usr/bin/vh_edit_config AutoShare All 0
/usr/bin/vh_editini AutoShare All 0
fi
#if bashio::config.has_value 'clientid'; then
if [ -n "$clientid" ]; then
#clientid=($(bashio::config 'clientid'))
bashio::log.info "Set General ClientId to ${clientid}"
/usr/bin/vh_edit_config General ClientId ${clientid}
/usr/bin/vh_editini General ClientId ${clientid}
else
bashio::log.info "Set General ClientId to null"
/usr/bin/vh_edit_config General ClientId null
/usr/bin/vh_editini General ClientId
fi
if [ -n "$manualhub" ]; then
bashio::log.info "Set Settings ManualHubs to ${manualhub}"
/usr/bin/vh_edit_config Settings ManualHubs ${manualhub}
/usr/bin/vh_editini Settings ManualHubs ${manualhub}
else
bashio::log.info "Set Settings ManualHubs to null"
/usr/bin/vh_edit_config Settings ManualHubs null
/usr/bin/vh_editini Settings ManualHubs
fi
@@ -1,4 +1,4 @@
#!/command/with-contenv bashio
/sbin/modprobe -s vhci-hcd
mount -o remount -t sysfs sysfs /sys
#mount -o remount -t sysfs sysfs /sys
+5 -3
View File
@@ -1,12 +1,14 @@
#!/command/with-contenv bashio
tmpfile="/tmp/vhclient_config_tmp"
file="/config/vhclient.ini"
touch $file
if [ -z "${3:-}" ]; then
v = ''
v=''
else
v = $3
v=$3
fi
awk -f /usr/bin/vh_editini.awk -v section=$1 -v key=$2 -v value=$v $file
awk -f /usr/bin/vh_editini.awk -v section=$1 -v key=$2 -v value=$v $file > $tmpfile
mv $tmpfile $file
-1
View File
@@ -37,7 +37,6 @@ $0 ~ "^\\[" section "\\]" {
}
END {
#print "Found section: " section " " found_section " and " key " " found_key;
if (!found_section) {
print "[" section "]";
print key "=" value;