@Sebastian-Roth The Middleware::Response Invalid host
was expected; the host wasn’t registered at the time of the initial query. It is now and producing logs like:
9/17/2019 10:29 AM Middleware::Communication URL: http://10.10.25.15/fog/management/index.php?sub=requestClientInfo&configure&newService&json
9/17/2019 10:29 AM Middleware::Response Success
9/17/2019 10:29 AM Middleware::Communication URL: http://10.10.25.15/fog/management/index.php?sub=requestClientInfo&mac=38:C9:86:4F:EE:1E|28:F0:76:49:AD:70|0A:F0:76:49:AD:70|26:EA:E7:94:F6:3A|1A:00:01:E3:00:70|1A:00:01:E3:00:71|1A:00:01:E3:00:70&newService&json
9/17/2019 10:29 AM Middleware::Authentication Waiting for authentication timeout to pass
9/17/2019 10:29 AM Middleware::Communication Download: http://10.10.25.15/fog/management/other/ssl/srvpublic.crt
9/17/2019 10:29 AM Data::RSA FOG Server CA cert found
9/17/2019 10:29 AM Middleware::Authentication Cert OK
9/17/2019 10:29 AM Middleware::Authentication No token found at /opt/fog-service/token.dat, this is expected if the client has not authenticated before
9/17/2019 10:29 AM Middleware::Authentication ERROR: Could not get security token
9/17/2019 10:29 AM Middleware::Authentication ERROR: Could not find file "/opt/fog-service/token.dat"
9/17/2019 10:29 AM Middleware::Communication POST URL: http://10.10.25.15/fog/management/index.php?sub=requestClientInfo&authorize&newService
9/17/2019 10:29 AM Middleware::Response Success
9/17/2019 10:29 AM Middleware::Authentication Authenticated
9/17/2019 10:29 AM Middleware::Communication URL: http://10.10.25.15/fog/management/index.php?sub=requestClientInfo&mac=38:C9:86:4F:EE:1E|28:F0:76:49:AD:70|0A:F0:76:49:AD:70|26:EA:E7:94:F6:3A|1A:00:01:E3:00:70|1A:00:01:E3:00:71|1A:00:01:E3:00:70&newService&json
9/17/2019 10:29 AM Middleware::Response Success
9/17/2019 10:29 AM Middleware::Communication URL: http://10.10.25.15/fog/service/getversion.php?clientver&newService&json
9/17/2019 10:29 AM Middleware::Communication URL: http://10.10.25.15/fog/service/getversion.php?newService&json
9/17/2019 10:29 AM Service Creating user agent cache
9/17/2019 10:29 AM Middleware::Response Invalid time
9/17/2019 10:29 AM Middleware::Response No Printers
9/17/2019 10:29 AM Middleware::Response Module is disabled globally on the FOG server
Fair warning: some of this is likely just me getting familiar with the code base… correct me as necessary.
That code segment kicks off the script that starts fogservice.exe after installation, but it is only executed when the OS is linux (UniversalInstaller.cs#L308). But if fogservice.exe were to start for macOS, I don’t see any place in fogservice that registers org.freeghost.daemon.plist
as something to be started automatically by the operating system.
The (limited) documentation (Apple Terminal Users Guide, launchctl man page), a blog post, and more misc. google-foo seems to show a consensus that services are loaded via launchctl
. I do see that the expected calls to launchctl
exist in UpdateHelper (using the legacy load
/unload
invocations), but I am having some difficulty tracing the execution back through Zazzles updater abstraction to there. On the surface it appears to rely on the existence of SmartInstaller.exe, so I would assume (possibly incorrectly) that the update code is only invoked when an update is called for by the fog server. In this case, the call to launchctl
never happens, the services (system daemon and user agent) are never registered, and the daemon doesn’t start on reboot. That would be consistent with an empty fog.log as I found.
This is of course assuming there isn’t another means of registering the daemons in use, in which case It would be helpful to know what the intended implementation was so I can take a look at how it’s breaking. Otherwise, I will likely try adding in the launchctl
invocations to Install() when I have some time to test again.