diff options
author | feld <feld@FreeBSD.org> | 2018-03-15 03:20:29 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2018-03-15 03:20:29 +0800 |
commit | 90414826e67770f55fa26837c202dae26b335959 (patch) | |
tree | 578a89377069fcdf588a423a3493a03ba1024599 /textproc | |
parent | 50fc6f05f62d7b4fbc5c6f2ceb352d9291494aef (diff) | |
download | freebsd-ports-gnome-90414826e67770f55fa26837c202dae26b335959.tar.gz freebsd-ports-gnome-90414826e67770f55fa26837c202dae26b335959.tar.zst freebsd-ports-gnome-90414826e67770f55fa26837c202dae26b335959.zip |
textproc/kibana6: Fix ability to install plugins
- Also update rc script to better match behavior of the stock "kibana" script
which starts up the process in environments where you are not using a
traditional rc / init script.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/kibana6/Makefile | 17 | ||||
-rw-r--r-- | textproc/kibana6/files/kibana.in | 11 |
2 files changed, 18 insertions, 10 deletions
diff --git a/textproc/kibana6/Makefile b/textproc/kibana6/Makefile index 2767c67d59cb..b0be80db75ef 100644 --- a/textproc/kibana6/Makefile +++ b/textproc/kibana6/Makefile @@ -4,7 +4,7 @@ PORTNAME= kibana PORTVERSION= 6.2.2 DISTVERSIONSUFFIX= -linux-x86_64 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc www MASTER_SITES= https://artifacts.elastic.co/downloads/kibana/ \ http://artifacts.elastic.co/downloads/kibana/ @@ -26,15 +26,16 @@ USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-deinstall do-install: - ${CP} ${WRKSRC}/config/kibana.yml ${STAGEDIR}${PREFIX}/etc/kibana.yml.sample - ${MKDIR} ${STAGEDIR}${WWWDIR} - cd ${WRKSRC} && \ - ${RM} -r bin config node && \ - ${RM} -r optimize && \ - ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} + ${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/config/kibana.yml ${STAGEDIR}${ETCDIR}/kibana.yml.sample + (cd ${WRKSRC} && \ + ${RM} -r config node optimize && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}) + ${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${WWWDIR}/config + ${CHMOD} +x ${STAGEDIR}${WWWDIR}/bin/* post-install: - ${ECHO} "@sample etc/kibana.yml.sample" >> ${TMPPLIST} + ${ECHO} "@sample ${ETCDIR}/kibana.yml.sample" >> ${TMPPLIST} ${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} ${ECHO} "@dir(www,www) ${WWWDIR}/data" >> ${TMPPLIST} diff --git a/textproc/kibana6/files/kibana.in b/textproc/kibana6/files/kibana.in index b9c128934563..731cd42bd92a 100644 --- a/textproc/kibana6/files/kibana.in +++ b/textproc/kibana6/files/kibana.in @@ -15,17 +15,20 @@ rcvar=kibana_enable load_rc_config $name : ${kibana_enable:="NO"} -: ${kibana_config:="%%PREFIX%%/etc/kibana.yml"} +: ${kibana_config:="%%ETCDIR%%/kibana.yml"} : ${kibana_user:="www"} : ${kibana_group:="www"} : ${kibana_log:="/var/log/kibana.log"} +export BABEL_DISABLE_CACHE=1 +export NODE_ENV=production + required_files="${kibana_config}" pidfile="/var/run/${name}/${name}.pid" start_precmd="kibana_precmd" procname="%%LOCALBASE%%/bin/node" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} env BABEL_DISABLE_CACHE=1 ${procname} %%WWWDIR%%/src/cli serve --config ${kibana_config} --log-file ${kibana_log}" +command_args="-f -p ${pidfile} ${procname} --no-warnings %%WWWDIR%%/src/cli serve --config ${kibana_config} --log-file ${kibana_log}" kibana_precmd() { @@ -39,6 +42,10 @@ kibana_precmd() if [ ! -d %%WWWDIR%%/optimize ]; then install -d -o ${kibana_user} -g ${kibana_group} %%WWWDIR%%/optimize + else + # We may have installed a plugin as root which will cause files in here + # to be owned by root:wheel. Fix with a chown. + chown -R ${kibana_user}:${kibana_group} %%WWWDIR%%/optimize fi } |