diff --git a/vhclient/config.yaml b/vhclient/config.yaml index 84c4bda..7bfb9be 100644 --- a/vhclient/config.yaml +++ b/vhclient/config.yaml @@ -1,5 +1,5 @@ name: VirtualHere Client -version: "0.1.337" +version: "0.1.338" slug: vhclient description: VirtualHere Client arch: diff --git a/vhclient/rootfs/etc/s6-overlay/scripts/init-config b/vhclient/rootfs/etc/s6-overlay/scripts/init-config index 1d2781e..4e20737 100755 --- a/vhclient/rootfs/etc/s6-overlay/scripts/init-config +++ b/vhclient/rootfs/etc/s6-overlay/scripts/init-config @@ -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 diff --git a/vhclient/rootfs/etc/s6-overlay/scripts/init-vhclient b/vhclient/rootfs/etc/s6-overlay/scripts/init-vhclient index d68456b..6ed29e1 100755 --- a/vhclient/rootfs/etc/s6-overlay/scripts/init-vhclient +++ b/vhclient/rootfs/etc/s6-overlay/scripts/init-vhclient @@ -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 diff --git a/vhclient/rootfs/usr/bin/vh_editini b/vhclient/rootfs/usr/bin/vh_editini index 586b9ad..6837390 100755 --- a/vhclient/rootfs/usr/bin/vh_editini +++ b/vhclient/rootfs/usr/bin/vh_editini @@ -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 diff --git a/vhclient/rootfs/usr/bin/vh_editini.awk b/vhclient/rootfs/usr/bin/vh_editini.awk index 784a5bb..69aeb8a 100755 --- a/vhclient/rootfs/usr/bin/vh_editini.awk +++ b/vhclient/rootfs/usr/bin/vh_editini.awk @@ -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;