I need to evaluate if the OS X Server.app has been installed and if it has been started or not. This I need to do from within a shell script.
I could check for existing folder names, but I would expect it cannot truly make sure that the Server.app is installed and up and running so that I can run the serveradmin
command.
Anyone with a suggestion?
This is a follow-up question to my previous question: Configure the OS X Server from .pkg postinstall script
serverinfo
might help. And you could test for the existence ofserveradmin
and assume "no server" if it is missing.serverinfo -q --software
helped. Thank you for helping @patrix