From owner-dev-commits-ports-all@freebsd.org Sun Apr 25 20:53:39 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D60D5EB0B3; Sun, 25 Apr 2021 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FT0cM3j71z4c5l; Sun, 25 Apr 2021 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D4CD1B017; Sun, 25 Apr 2021 20:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13PKrdxI011524; Sun, 25 Apr 2021 20:53:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13PKrdIc011523; Sun, 25 Apr 2021 20:53:39 GMT (envelope-from git) Date: Sun, 25 Apr 2021 20:53:39 GMT Message-Id: <202104252053.13PKrdIc011523@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Yuri Victorovich Subject: git: c9f9ae1515c7 - 2021Q2 - www/adguardhome: Add rc script and pkg-message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: c9f9ae1515c756aaf915ba11db82b77b224c2fea Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2021 20:53:39 -0000 The branch 2021Q2 has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=c9f9ae1515c756aaf915ba11db82b77b224c2fea commit c9f9ae1515c756aaf915ba11db82b77b224c2fea Author: Yuri Victorovich AuthorDate: 2021-04-25 20:51:02 +0000 Commit: Yuri Victorovich CommitDate: 2021-04-25 20:53:36 +0000 www/adguardhome: Add rc script and pkg-message (cherry picked from commit c70aa54be27431b2e6b0adca99b3f733d2cf9200) --- www/adguardhome/Makefile | 6 +++++- www/adguardhome/files/adguardhome.in | 25 +++++++++++++++++++++++++ www/adguardhome/pkg-message | 11 +++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/www/adguardhome/Makefile b/www/adguardhome/Makefile index 3c8cd2da87f2..12a5bb45c616 100644 --- a/www/adguardhome/Makefile +++ b/www/adguardhome/Makefile @@ -2,7 +2,7 @@ PORTNAME= adguardhome DISTVERSIONPREFIX= v DISTVERSION= 0.105.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MAINTAINER= yuri@FreeBSD.org @@ -24,6 +24,10 @@ GO_MODULE= github.com/AdguardTeam/AdGuardHome DEV_UPDATE_MODE= no +USER= root # it has to run as root because it listens on the privileged DNS port +SUB_LIST= USER=${USER} +USE_RC_SUBR= ${PORTNAME} + .if (${DEV_UPDATE_MODE} == "yes") BUILD_DEPENDS= npm:www/npm \ yarn:www/yarn diff --git a/www/adguardhome/files/adguardhome.in b/www/adguardhome/files/adguardhome.in new file mode 100644 index 000000000000..902745da6a35 --- /dev/null +++ b/www/adguardhome/files/adguardhome.in @@ -0,0 +1,25 @@ +#!/bin/sh + +# PROVIDE: adguardhome +# REQUIRE: DAEMON NETWORKING +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable adguardhome: +# adguardhome_enable : set to "YES" to enable the daemon, default is "NO" + +. /etc/rc.subr + +name=adguardhome +rcvar=adguardhome_enable + +load_rc_config $name + +adguardhome_enable=${adguardhome_enable:-"NO"} + +logfile="/var/log/${name}.log" + +procname=%%PREFIX%%/bin/adguardhome +command="/usr/sbin/daemon" +command_args="-u %%USER%% -o ${logfile} -t ${name} %%PREFIX%%/bin/adguardhome" + +run_rc_command "$1" diff --git a/www/adguardhome/pkg-message b/www/adguardhome/pkg-message new file mode 100644 index 000000000000..1a789dcbcb7b --- /dev/null +++ b/www/adguardhome/pkg-message @@ -0,0 +1,11 @@ +[ +{ type: install + message: <