Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jan 2021 17:17:59 +0000 (UTC)
From:      Neel Chauhan <nc@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r561740 - in head/games/automuteus: . files
Message-ID:  <202101161717.10GHHxMJ005141@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nc
Date: Sat Jan 16 17:17:59 2021
New Revision: 561740
URL: https://svnweb.freebsd.org/changeset/ports/561740

Log:
  games/automuteus: Fix rc script
  
  Reviewed by:		0mp (mentor)
  Approved by:		0mp (mentor)
  Differential Revision:	https://reviews.freebsd.org/D28107

Modified:
  head/games/automuteus/Makefile
  head/games/automuteus/files/automuteus.in

Modified: head/games/automuteus/Makefile
==============================================================================
--- head/games/automuteus/Makefile	Sat Jan 16 17:17:20 2021	(r561739)
+++ head/games/automuteus/Makefile	Sat Jan 16 17:17:59 2021	(r561740)
@@ -2,6 +2,7 @@
 
 PORTNAME=	automuteus
 DISTVERSION=	6.10.1
+PORTREVISION=	1
 CATEGORIES=	games
 
 MAINTAINER=	nc@FreeBSD.org
@@ -11,12 +12,6 @@ LICENSE=	MIT
 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 @@ GH_TUPLE=	\
 		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>

Modified: head/games/automuteus/files/automuteus.in
==============================================================================
--- head/games/automuteus/files/automuteus.in	Sat Jan 16 17:17:20 2021	(r561739)
+++ head/games/automuteus/files/automuteus.in	Sat Jan 16 17:17:59 2021	(r561740)
@@ -19,11 +19,12 @@ load_rc_config $name
 
 : ${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 @@ automuteus_start()
 	/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"



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