Page MenuHomeFreeBSD

D28107.id82376.diff
No OneTemporary

D28107.id82376.diff

Index: head/games/automuteus/Makefile
===================================================================
--- head/games/automuteus/Makefile
+++ head/games/automuteus/Makefile
@@ -2,6 +2,7 @@
PORTNAME= automuteus
DISTVERSION= 6.10.1
+PORTREVISION= 1
CATEGORIES= games
MAINTAINER= nc@FreeBSD.org
@@ -11,12 +12,6 @@
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go:modules
-USE_RC_SUBR= ${PORTNAME}
-SUB_FILES= pkg-message
-
-GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
-GO_TARGET= .:${PORTNAME}
-
USE_GITHUB= yes
GH_ACCOUNT= denverquane
@@ -64,10 +59,21 @@
stretchr:objx:v0.2.0:stretchr_objx/vendor/github.com/stretchr/objx \
stretchr:testify:v1.6.1:stretchr_testify/vendor/github.com/stretchr/testify
-PLIST_FILES= bin/${PORTNAME} etc/${PORTNAME}/config.txt
+USE_RC_SUBR= ${PORTNAME}
+GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
+GO_TARGET= .:${PORTNAME}
+
+SUB_FILES= pkg-message
+PLIST_FILES= bin/${PORTNAME} \
+ "@sample etc/${PORTNAME}/config.txt.sample" \
+ "@dir /var/log/automuteus" \
+ /var/log/${PORTNAME}/logs.txt
+
post-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/etc/automuteus
- @${CP} ${FILESDIR}/config.txt ${STAGEDIR}${PREFIX}/etc/automuteus
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+ @${CP} ${FILESDIR}/config.txt ${STAGEDIR}${ETCDIR}/config.txt.sample
+ @${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
+ @${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/logs.txt
.include <bsd.port.mk>
Index: head/games/automuteus/files/automuteus.in
===================================================================
--- head/games/automuteus/files/automuteus.in
+++ head/games/automuteus/files/automuteus.in
@@ -19,11 +19,12 @@
: ${automuteus_enable:="NO"}
: ${automuteus_conf:="%%PREFIX%%/etc/automuteus/config.txt"}
-: ${automuteus_log:="/var/log/automuteus.log"}
+: ${automuteus_log:="/var/log/automuteus"}
command="%%PREFIX%%/bin/automuteus"
pidfile=/var/run/${name}.pid
start_cmd="automuteus_start"
+stop_cmd="automuteus_stop"
automuteus_start()
{
@@ -31,9 +32,14 @@
/usr/sbin/daemon \
-p ${pidfile} \
/usr/bin/env \
- "CONFIG_FILE=${automuteus_conf}" \
+ "CONFIG_PATH=${automuteus_conf}" \
"LOG_PATH=${automuteus_log}" \
${command}
+}
+
+automuteus_stop()
+{
+ kill `cat ${pidfile}`
}
run_rc_command "$1"

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 9:26 AM (14 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31023272
Default Alt Text
D28107.id82376.diff (2 KB)

Event Timeline