From nobody Wed Sep 25 13:52:13 2024 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 4XDJ7d1ZwXz5XW33; Wed, 25 Sep 2024 13:52:13 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDJ7d17SPz46mr; Wed, 25 Sep 2024 13:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272333; 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=HqBKiEDii2bOPuHul5NndmK56Pd94LsUAk27e+Qn+RY=; b=P+msDh8YiHyweMkpiQ9deCqVoTWcyjZOqzZcwZkTqJegNa4lqa6osQ7Dy7YB6GIFSgAIHT SiyB20EKaHkaWrNlZKDQ6udJabbUElmVuhpaku6sBsJhs7NcC+IvKrrZ1EgyoCR14OodKl AojGBYJ7pncLtPaXBh0gppFLXMXzujrWlApHzWM0hH2SDMrqWx3sntxvnElEcbr3YEQ5+1 +OHxkeBW8PapSGBcaZwtGGa7sAklAUbAynDrsGZUKxexTZhy4nGn6fgOMZZVTHCefo5I3V GKG9FYTyW+kPE3zKOb3veIWGoWqQGn9XVnHSr858T1dsDQ3/zdwp6qMiy5MQrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272333; 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=HqBKiEDii2bOPuHul5NndmK56Pd94LsUAk27e+Qn+RY=; b=gN0O++cAUA7FP+F6iVOXkhw5SBKXFBaAI4VSffONVBgV62JXuC49aM96Uw73qwi1OERtgf I9MOGfZ+4/NNZwvgtEBEyXkmL/qC9k5ZghXT32GE7UPfuxSrC1UMUqVQgE+pGvUy6S5UjA RFHlTK255Ze8wigqMpjKmx8owQS8RYo804vWpV+w2ZnWOUT0SQV1lCliN6lByp9adG4Z9y uaOgtq0fmwaTMx2jjDvR6l4bVgYYoRDP+PXhasKn2eZcItOoH5f0ipdk6huHlAzLYZ4g23 U+oufk5p79c4aYvHa8vrOt7IyRcTcks2cNbE93LLW/ikm7Zm9pHxi7kui7DpGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727272333; a=rsa-sha256; cv=none; b=EEnFmW2qNiZKoprIeBLGsQSl6LCeTpuRitIQpda+QQEP47vvxavyDVauf19Yy0vhwVHuTL xfKtF+4uUZE6FqpGUG6Jc7ajN+cQxqhJtzQOre4k3boEKr+A7q/ncNFHL9W9DlVS3uGJI3 oGYEKlyMNf7EN45pexvM/tU5h+YyPn0uR7JyjB2R5wxkZCVkcLlkch4fInBaYIhKx2n3nd hmiLevp++nHvTiOPvQeQISqk810P4CbqAJuNXlxmemlalS6UxjjwWiLTPhPg0EajYN8c4z MecWkTNZAMckdW44+LMcV4GqJdEUz8iGWhkg4mMaXqbxmzW8YerWqD2FjxwhAA== 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 4XDJ7d0kR1zFpT; Wed, 25 Sep 2024 13:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48PDqDRD006829; Wed, 25 Sep 2024 13:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PDqDbZ006826; Wed, 25 Sep 2024 13:52:13 GMT (envelope-from git) Date: Wed, 25 Sep 2024 13:52:13 GMT Message-Id: <202409251352.48PDqDbZ006826@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 55d213c5c990 - main - sysutils/ttyd: add daemon mode 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55d213c5c9903a133612983f6e0abaa7a6c796ba Auto-Submitted: auto-generated The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=55d213c5c9903a133612983f6e0abaa7a6c796ba commit 55d213c5c9903a133612983f6e0abaa7a6c796ba Author: Dave Cottlehuber AuthorDate: 2024-09-25 07:29:19 +0000 Commit: Dave Cottlehuber CommitDate: 2024-09-25 13:50:48 +0000 sysutils/ttyd: add daemon mode Differential Revision: https://reviews.freebsd.org/D45362 Approved by: nc (maintainer) Sponsored by: SkunkWerks, GmbH --- sysutils/ttyd/Makefile | 2 ++ sysutils/ttyd/files/ttyd.in | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/sysutils/ttyd/Makefile b/sysutils/ttyd/Makefile index 5c0f78cd6bc1..8f1aec83cd4f 100644 --- a/sysutils/ttyd/Makefile +++ b/sysutils/ttyd/Makefile @@ -1,5 +1,6 @@ PORTNAME= ttyd DISTVERSION= 1.7.7 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= nc@FreeBSD.org @@ -17,6 +18,7 @@ LIB_DEPENDS= libjson-c.so:devel/json-c \ USES= cmake pkgconfig ssl USE_GITHUB= yes GH_ACCOUNT= tsl0922 +USE_RC_SUBR= ${PORTNAME} CMAKE_ARGS= -DCMAKE_DISABLE_FIND_PACKAGE_Git:BOOL=True diff --git a/sysutils/ttyd/files/ttyd.in b/sysutils/ttyd/files/ttyd.in new file mode 100755 index 000000000000..56b8188deeda --- /dev/null +++ b/sysutils/ttyd/files/ttyd.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# PROVIDE: ttyd +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# ttyd_enable (bool): Set to NO by default. Set it to YES to enable ttyd. +# ttyd_acct (string): Default user to run ttyd under, "nobody" +# ttyd_exec (string): Default command to run in ttyd, "/bin/sh" +# ttyd_args (string): Extra arguments passed to ttyd. +# Default is "--interface lo0 --port 7681" + +. /etc/rc.subr + +name=ttyd +rcvar=ttyd_enable + +load_rc_config $name + +: ${ttyd_enable:="NO"} +: ${ttyd_acct:="nobody"} +: ${ttyd_exec:="/bin/sh"} +: ${ttyd_args:="--interface lo0 --port 7681"} + +procname="/usr/local/bin/${name}" + +command="/usr/sbin/daemon" +command_args="-r -R 15 -f -t ${name} -T ttyd -u ${ttyd_acct} /usr/local/bin/ttyd ${ttyd_args} ${ttyd_exec}" + +run_rc_command "$1"