Can't run 2.2 or higher using LaunchDaemon on Mac

This was discussedhere but hasn’t seemed to be resolved.

I would like to upgrade from 2.0, but if I do, I get an error of “Unable to create a system terminal, creating a dumb terminal” when starting manually or via LaunchDaemon on 2.2. Version 2.1 does work, but then there are issues with the Astro binding on it.

I am using an i5 Mac Mini with 8GB ram, so there shouldn’t be any issues with hardware.

If this can’t be easily resolved, is anyone running OH2.2 on a Mac at the moment?

Yes, I do.

I have written a small bash script, that restarts openhab when it exits. This script is started via the screen utility, but this is just a crude workaround for the time I was on vacation.

Would you mind sharing your script?

And do you mean you go in on screen sharing, and then run it in a terminal?

That is really very simple, I just added an infinite loop around the openhab start command:

while true; do
        echo "Launching the openHAB runtime..."

        export OPENHAB_HTTP_PORT=9180
        export OPENHAB_HTTPS_PORT=9143

        export EXTRA_JAVA_OPTS=""

        DIRNAME=`dirname "$0"`
        exec "${DIRNAME}/runtime/bin/karaf" "${@}"

        echo "openHAB exited, restarting in 10s..."

        sleep 10

I added the “sleep 10” at the end to give ma a chance to interrupt the loop. This could be solved much more sophisticated but I was in a hurry before an vacation, beside that I still hope, that the issue with starting openhab via launchd will be solved.

Forgot that one: I use the screen utility (/usr/bin/screen), starting in a terminal via screen sharing will work to!