Playing with the misc/openhab rc script (https://cgit.freebsd.org/ports/tree/misc/openhab/files/openhab.in).
The rc magic starts daemon under the openhab user:
but to stop or status you have to explicitly su, right?
The rc magic starts daemon under the openhab user:
Code:
limits -C daemon su -m openhab -c 'sh -c "/usr/sbin/daemon -p /var/run/openhab/openhab.pid -c -t openhab /usr/local/libexec/openhab/start.sh server"'
Code:
openhab_stop() {
su -m ${openhab_user} -c "${OPENHAB_RUNTIME}/bin/stop"