aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/scribe/Makefile6
-rw-r--r--net/scribe/files/scribe.in17
2 files changed, 19 insertions, 4 deletions
diff --git a/net/scribe/Makefile b/net/scribe/Makefile
index 25893641d5ea..79521fc9c857 100644
--- a/net/scribe/Makefile
+++ b/net/scribe/Makefile
@@ -6,7 +6,7 @@
PORTNAME= scribe
PORTVERSION= 2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://cloud.github.com/downloads/facebook/scribe/
@@ -18,7 +18,8 @@ LIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \
event:${PORTSDIR}/devel/libevent \
thrift:${PORTSDIR}/devel/thrift
RUN_DEPENDS= p5-Class-Accessor>0:${PORTSDIR}/devel/p5-Class-Accessor \
- p5-Thrift>0:${PORTSDIR}/devel/p5-Thrift
+ p5-Thrift>0:${PORTSDIR}/devel/p5-Thrift \
+ py-thrift>0:${PORTSDIR}/devel/py-thrift
ACLOCAL_ARGS= -I ./aclocal
AUTOMAKE_ARGS= -a
@@ -31,6 +32,7 @@ USE_AUTOTOOLS= aclocal automake autoconf
USE_GMAKE= yes
USE_PYTHON= yes
USE_RC_SUBR= ${PORTNAME}
+SUB_LIST+= RM=${RM}
post-extract:
${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
diff --git a/net/scribe/files/scribe.in b/net/scribe/files/scribe.in
index 4dfd13a5bd60..a65ba65ae460 100644
--- a/net/scribe/files/scribe.in
+++ b/net/scribe/files/scribe.in
@@ -9,12 +9,25 @@
. /etc/rc.subr
name="scribe"
+rcvar=`set_rcvar`
pidfile="/var/run/${name}.pid"
-command="/usr/sbin/daemon -p ${pidfile} %%PREFIX%%/bin/scribed"
-procname="%%PREFIX%%/bin/scribed"
+command="%%PREFIX%%/bin/scribed"
+
+start_cmd=scribe_start
+stop_postcmd=scribe_cleanup
load_rc_config "$name"
: ${scribe_enable="NO"}
: ${scribe_flags=""}
+scribe_start()
+{
+ echo "Starting ${name}."
+ /usr/sbin/daemon -cf -p ${pidfile} ${command} ${scribe_flags}
+}
+
+scribe_cleanup() {
+ [ -f ${pidfile} ] && %%RM%% ${pidfile}
+}
+
run_rc_command "$1"