From nobody Wed Oct 12 12:01:49 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MnWTn2xJSz4fBjQ; Wed, 12 Oct 2022 12:01:49 +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 4MnWTn2BxYz3sy4; Wed, 12 Oct 2022 12:01:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665576109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdtG/aLcGiJO8m/hawsxo+6VXyrXgIFS40J8I5GSTAA=; b=yRwFxMzr5MrQAwfusiBBy9OR+WHEQYbI316WI9vjx6SK3K4pe14Z07sni+xam74zfTO30c VI5hVMKwd+0wT3wS15mHaJWHiXA5eYtnAbU0mOQBIrfTmIBD3HkbMMXfINVJ6qsUVyr7qj NcI/QCwKhpE1wFAzhk3KbXZO53jxJby3C/ddyclCTs1TWr3U7qE6+Q4tW6aYt+BQUOpsgW 1qXSOrIhw4qh7OKwA9VyYdwWAZOhcMq+rwYGN0pjaFY0Xc8rmuHA49UeLDgcyHerRFWDeQ zwOCc1utgGfulaeQhrWUa6Rp5FVR0r420on/n2IgxXPs5xhOTucI0dgtizXVTg== 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 4MnWTn1H6Gz1J3g; Wed, 12 Oct 2022 12:01:49 +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 29CC1nUE056265; Wed, 12 Oct 2022 12:01:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29CC1nM3056264; Wed, 12 Oct 2022 12:01:49 GMT (envelope-from git) Date: Wed, 12 Oct 2022 12:01:49 GMT Message-Id: <202210121201.29CC1nM3056264@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= Subject: git: e2e231d0b5b0 - main - dns/knot-resolver: Fix service status List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2e231d0b5b03e64e9905b39e76ad9fd89ec765f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665576109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vdtG/aLcGiJO8m/hawsxo+6VXyrXgIFS40J8I5GSTAA=; b=MZeHGvO+mui4WzMt2haZpzRSwjQNK0hzM9kr7PKLSLwcbK/Cjg4NOlIkQaXPFVOPlvqVAt k76bKnhE7QMr9SBxbl6HdUogGZ62D2RO3KTMml1/bMnw6DaVtIoCDaJ4UnnxSY/E+lzkOs wznjwFdvBWJiRIrZ7xdlLQ8C+2egY9SKJTMPw+XGd8YxuTQZ9Hv2hwy3anqABFSofQCFlF w6j+GXeJbYMBpqtTNHkQNK1Lc5d/3Es/CuuVbFyzrV7oJwUxPOYf4mFWZTkF1sazj3s7QI fnzzsDs3DbO1axyx6R5e3WNarxMv0kplFylnKYlzDla1qfxXRD4QBFx+ZAukvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665576109; a=rsa-sha256; cv=none; b=Mb9ZLxr+d4b7VwR+MeWH2z/6ZZDcHF5vW1c/iBDyHqy+1lfBU6ZIur1G0p7ENZo6mOQTKy HgxbQk2A5SdUvz5NaDGp1AMFt/qKumjSdUIVa775ThYwf27ibZZh9HVhzLUHodx3SC98/K Ivndrf22hOJ9E6hVYKNm4JqdnN2l97RykGuej89AvY+fEZ008kN2nNUSqpjUeuQ49lIQSI wX+UaONr9+IKcZggn3MctVFU0Xu8W/OFue0p4QATnCFhOm6MYpE499NbAUNfBqurc9s7zW Tyd+F76RJolr7n0TNh9A9kMJYylGJplPdL7xR3aV5iElurlWsomHX/hg+nn8lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=e2e231d0b5b03e64e9905b39e76ad9fd89ec765f commit e2e231d0b5b03e64e9905b39e76ad9fd89ec765f Author: Fernando ApesteguĂ­a AuthorDate: 2022-10-11 15:49:47 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2022-10-12 11:58:10 +0000 dns/knot-resolver: Fix service status Add status() function to rc script. PR: 266320 Reported by: yonas.yanfa@gmail.com Approved by: freebsd@dns.company (maintainer, timeout > 1 month) --- dns/knot-resolver/files/kresd.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dns/knot-resolver/files/kresd.in b/dns/knot-resolver/files/kresd.in index 344bf82f9479..9cc3d309a43f 100644 --- a/dns/knot-resolver/files/kresd.in +++ b/dns/knot-resolver/files/kresd.in @@ -62,4 +62,14 @@ kresd_stop() { fi } +kresd_status() { + if [ -e "${pidfile}" ]; then + echo "${name} is running on pid $(cat $pidfile)." + return 1 + else + echo "${name} is not running." + return 0 + fi +} + run_rc_command "$1"