The code is using php's function gethostname since I can't use javascript to get the hostname anymore. I may have to execute the command hostname -f and use its output. Does hostname -f return the correct hostname on your system?
Unfortunately, it isn't cut&paste.
The symlinks plugin shouldn't be a problem to port since it is pretty simple.
ryecoaaron You can use \OMV\System\Net\DNS to get the hostname, but the better approach is to load the conf.system.network.dns database object and build the hostname yourself. Think about the situation where the hostname is modified but not applied, then your plugin is modified and the PHP code uses gethostname to get the hostname, this will finally end in incorrect data.
I don't know the plugin, but why not getting the hostname while deploying the configuration. You can use Salt grains to get the hostname or easily access the conf.system.network.dns database object. You can make 'hostname' a dependency of your RPC module, thus 'hostname' is deployed before your plugin, and you can be sure the Salt grain contains the correct hostname.