I wanted to make sure the device hostname matched the name set in the VirtualHere GUI so I have attempted to make a script to update the underlying OpenWRT using the uci command.
I find that when a server rename is done from the client GUI the script does run, and does update the OS hostname, but the server rename itself no longer happens.
Is there something I am missing? Does the script need to return a specific value before the config.ini will get updated?
The line added to config.ini is:
The script is:
# This script will set the OpenWRT Hostname property to match the name set via the
# VirtualHere client admin interface.
if [[ -z "$1" ]]; then
echo "Error: no new hostname provided."
/sbin/uci set system.@system.hostname="$1"