Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2020 19:27:52 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r548415 - in head/www/beehive: . files
Message-ID:  <202009121927.08CJRqN4081889@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Sat Sep 12 19:27:52 2020
New Revision: 548415
URL: https://svnweb.freebsd.org/changeset/ports/548415

Log:
  www/beehive: cleanup rc script and pkg-plist
  
  PR:		249279
  Submitted by:	Lewis Cook <vulcan@wired.sh> (maintainer)

Deleted:
  head/www/beehive/pkg-plist
Modified:
  head/www/beehive/Makefile   (contents, props changed)
  head/www/beehive/files/beehive.in

Modified: head/www/beehive/Makefile
==============================================================================
--- head/www/beehive/Makefile	Sat Sep 12 19:25:23 2020	(r548414)
+++ head/www/beehive/Makefile	Sat Sep 12 19:27:52 2020	(r548415)
@@ -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
@@ -156,9 +158,6 @@ post-extract:
 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}

Modified: head/www/beehive/files/beehive.in
==============================================================================
--- head/www/beehive/files/beehive.in	Sat Sep 12 19:25:23 2020	(r548414)
+++ head/www/beehive/files/beehive.in	Sat Sep 12 19:27:52 2020	(r548415)
@@ -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 ${pidfiledir} ]; then
+		install -d -o ${beehive_user} -g ${beehive_group} ${pidfiledir}
+	fi
 	if [ ! -d %%ETCDIR%% ]; then
-		/bin/mkdir -p %%ETCDIR%%	
+		install -d -o ${beehive_user} -g ${beehive_group} %%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}
-	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
-	fi
-}
-
-beehive_poststop()
-{
-	rm -f ${pidfile}
 }
 
 run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009121927.08CJRqN4081889>