diff options
author | Alexander Leidinger <netchild@FreeBSD.org> | 2023-09-04 19:20:47 +0200 |
---|---|---|
committer | Alexander Leidinger <netchild@FreeBSD.org> | 2023-09-04 19:22:49 +0200 |
commit | c3383035389f393897c1287ab1682afb3c0ffea3 (patch) | |
tree | 0cfdb0ddc63371641cb3e159d4bdab0be57a1d7b /misc | |
parent | aa9736e3e5f6856f5eb5e26837169b0f6022eec8 (diff) | |
download | freebsd-ports-c3383035389f393897c1287ab1682afb3c0ffea3.zip |
misc/openhab: take runtime user into account, fix piddir handling
The rc.d script lost the runtime user handling and the piddir was not
set which caused warnings in the prestart routine.
Noticed by: Martin ehk <rehak@tekkirk.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/openhab/Makefile | 2 | ||||
-rw-r--r-- | misc/openhab/files/openhab.in | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/misc/openhab/Makefile b/misc/openhab/Makefile index 4e2313d4e650..c33dd44857e6 100644 --- a/misc/openhab/Makefile +++ b/misc/openhab/Makefile @@ -1,6 +1,6 @@ PORTNAME= openhab PORTVERSION= 4.0.2 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= misc java MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab/${PORTVERSION}/ DISTNAME= openhab-${PORTVERSION} diff --git a/misc/openhab/files/openhab.in b/misc/openhab/files/openhab.in index 5c2ce115c27e..7acec2be6e34 100644 --- a/misc/openhab/files/openhab.in +++ b/misc/openhab/files/openhab.in @@ -58,7 +58,7 @@ eval "_openhab_conf_dir=\${${name}_conf_dir:-'%%PREFIX%%/etc/openhab'}" eval "_openhab_runtime_dir=\${${name}_runtime_dir:-'%%PREFIX%%/libexec/openhab/runtime'}" eval "_openhab_userdata_dir=\${${name}_userdata_dir:-'/var/db/openhab/userdata'}" eval "_openhab_log_dir=\${${name}_log_dir:-'/var/log/openhab'}" -eval "_openhab_piddir=\${${name}_piddir}" +eval "_openhab_piddir=\${${name}_piddir:-/var/run/${name}}" eval "_openhab_java_opts=\${${name}_java_opts:-''}" @@ -78,12 +78,12 @@ export OPENHAB_LOGDIR="${_openhab_log_dir}" export LC_ALL=en_US.UTF-8 export JAVA_VERSION=17 -pidfile=/var/run/${name}/${name}.pid +pidfile=${_openhab_piddir}/${name}.pid start_precmd="openhab_prestart" command=/usr/sbin/daemon -command_args="-p ${pidfile} -c -t openhab ${OPENHAB_HOME}/start.sh server" +command_args="-u ${_openhab_user} -p ${pidfile} -c -t openhab ${OPENHAB_HOME}/start.sh server" openhab_prestart() { # Make sure we have our RUNDIR, even if it's on a tmpfs |