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 name: VirtualHere Client
version: "0.1.337" version: "0.1.338"
slug: vhclient slug: vhclient
description: VirtualHere Client description: VirtualHere Client
arch: arch:
@@ -8,35 +8,33 @@ manualhub=$(echo $options | jq -r '.manualhub | tostring')
if $autofind; then if $autofind; then
bashio::log.info "Enable General AutoFind" bashio::log.info "Enable General AutoFind"
/usr/bin/vh_edit_config General AutoFind 1 /usr/bin/vh_editini General AutoFind 1
else else
bashio::log.info "Disable General AutoFind" bashio::log.info "Disable General AutoFind"
/usr/bin/vh_edit_config General AutoFind 0 /usr/bin/vh_editini General AutoFind 0
fi fi
if $autouse; then if $autouse; then
bashio::log.info "Enable AutoShare All" bashio::log.info "Enable AutoShare All"
/usr/bin/vh_edit_config AutoShare All 1 /usr/bin/vh_editini AutoShare All 1
else else
bashio::log.info "Disable AutoShare" bashio::log.info "Disable AutoShare"
/usr/bin/vh_edit_config AutoShare All 0 /usr/bin/vh_editini AutoShare All 0
fi fi
#if bashio::config.has_value 'clientid'; then
if [ -n "$clientid" ]; then if [ -n "$clientid" ]; then
#clientid=($(bashio::config 'clientid'))
bashio::log.info "Set General ClientId to ${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 else
bashio::log.info "Set General ClientId to null" bashio::log.info "Set General ClientId to null"
/usr/bin/vh_edit_config General ClientId null /usr/bin/vh_editini General ClientId
fi fi
if [ -n "$manualhub" ]; then if [ -n "$manualhub" ]; then
bashio::log.info "Set Settings ManualHubs to ${manualhub}" bashio::log.info "Set Settings ManualHubs to ${manualhub}"
/usr/bin/vh_edit_config Settings ManualHubs ${manualhub} /usr/bin/vh_editini Settings ManualHubs ${manualhub}
else else
bashio::log.info "Set Settings ManualHubs to null" bashio::log.info "Set Settings ManualHubs to null"
/usr/bin/vh_edit_config Settings ManualHubs null /usr/bin/vh_editini Settings ManualHubs
fi fi
@@ -1,4 +1,4 @@
#!/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
+5 -3
View File
@@ -1,12 +1,14 @@
#!/command/with-contenv bashio #!/command/with-contenv bashio
tmpfile="/tmp/vhclient_config_tmp"
file="/config/vhclient.ini" file="/config/vhclient.ini"
touch $file touch $file
if [ -z "${3:-}" ]; then if [ -z "${3:-}" ]; then
v = '' v=''
else else
v = $3 v=$3
fi 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 { END {
#print "Found section: " section " " found_section " and " key " " found_key;
if (!found_section) { if (!found_section) {
print "[" section "]"; print "[" section "]";
print key "=" value; print key "=" value;