aboutsummaryrefslogtreecommitdiff
path: root/www/beehive
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2020-09-12 19:27:52 +0000
committerSteve Wills <swills@FreeBSD.org>2020-09-12 19:27:52 +0000
commit70b2c9eee24c3f3554853723c609d5c42e5cbe52 (patch)
tree0f05501957009741c809aad122e560616c52cb24 /www/beehive
parent0dfa18061a2058368fd95baf3d2ad7c19b964b60 (diff)
downloadports-70b2c9eee24c3f3554853723c609d5c42e5cbe52.tar.gz
ports-70b2c9eee24c3f3554853723c609d5c42e5cbe52.zip
www/beehive: cleanup rc script and pkg-plist
PR: 249279 Submitted by: Lewis Cook <vulcan@wired.sh> (maintainer)
Notes
Notes: svn path=/head/; revision=548415
Diffstat (limited to 'www/beehive')
-rw-r--r--www/beehive/Makefile5
-rw-r--r--www/beehive/files/beehive.in40
-rw-r--r--www/beehive/pkg-plist2
3 files changed, 10 insertions, 37 deletions
diff --git a/www/beehive/Makefile b/www/beehive/Makefile
index 2ca6fdb08df4..162a2881e657 100644
--- a/www/beehive/Makefile
+++ b/www/beehive/Makefile
@@ -3,6 +3,7 @@
PORTNAME= beehive
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.0
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= vulcan@wired.sh
@@ -145,6 +146,7 @@ _BEEHIVE_USER= ${PORTNAME}
USERS= ${_BEEHIVE_USER}
GROUPS= ${_BEEHIVE_USER}
+PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README.md
OPTIONS_DEFINE= DOCS
@@ -157,9 +159,6 @@ pre-build:
(cd ${WRKSRC} && \
${LOCALBASE}/bin/go-bindata ${_BUILD_TAGS} --pkg api -o api/bindata.go --ignore config/.git assets/... config/...)
-post-install:
- @${MKDIR} ${STAGEDIR}${ETCDIR}
-
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
diff --git a/www/beehive/files/beehive.in b/www/beehive/files/beehive.in
index ef853ef64b88..e6ff435d16ec 100644
--- a/www/beehive/files/beehive.in
+++ b/www/beehive/files/beehive.in
@@ -31,46 +31,22 @@ load_rc_config $name
: ${beehive_user:="%%USERS%%"}
: ${beehive_group:="%%GROUPS%%"}
-pidfile="/var/run/${name}.pid"
+pidfiledir="/var/run/${name}"
+pidfile="${pidfiledir}/${name}.pid"
procname="%%PREFIX%%/bin/${name}"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${procname} -bind ${beehive_bind} -canonicalurl ${beehive_url} -config ${beehive_config}"
-start_precmd="${name}_pre"
-stop_cmd="${name}_stop"
-stop_postcmd="${name}_poststop"
+start_precmd="${name}_prestart"
-beehive_pre()
+beehive_prestart()
{
- /usr/bin/install -o ${beehive_user} -g ${beehive_group} -m 755 -- /dev/null ${pidfile}
-
- if [ ! -d %%ETCDIR%% ]; then
- /bin/mkdir -p %%ETCDIR%%
- fi
-
- /usr/sbin/chown ${beehive_user}:${beehive_group} %%ETCDIR%%
- /bin/chmod 0700 %%ETCDIR%%
-
- if [ -f ${beehive_config} ]; then
- /usr/sbin/chown ${beehive_user}:${beehive_group} ${beehive_config}
- /bin/chmod 0600 ${beehive_config}
+ if [ ! -d ${pidfiledir} ]; then
+ install -d -o ${beehive_user} -g ${beehive_group} ${pidfiledir}
fi
-}
-
-beehive_stop()
-{
- if [ -f ${pidfile} ]; then
- echo "Stopping ${name}."
- kill -INT `cat ${pidfile}` 2>/dev/null
- else
- echo "${name} is not running."
- return 1
+ if [ ! -d %%ETCDIR%% ]; then
+ install -d -o ${beehive_user} -g ${beehive_group} %%ETCDIR%%
fi
}
-beehive_poststop()
-{
- rm -f ${pidfile}
-}
-
run_rc_command "$1"
diff --git a/www/beehive/pkg-plist b/www/beehive/pkg-plist
deleted file mode 100644
index 871b96673687..000000000000
--- a/www/beehive/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-bin/beehive
-@dir %%ETCDIR%%