FreeBSD Bugzilla – Attachment 258975 Details for
Bug 285628
[devel/athens]: Add rc script and sample config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds an rc script for running athens as a daemon
0001-Add-rc-script-for-devel-athens-and-sample-config-fil.patch (text/plain), 2.52 KB, created by
Einar Bjarni Halldórsson
on 2025-03-24 14:55:56 UTC
(
hide
)
Description:
Adds an rc script for running athens as a daemon
Filename:
MIME Type:
Creator:
Einar Bjarni Halldórsson
Created:
2025-03-24 14:55:56 UTC
Size:
2.52 KB
patch
obsolete
>From 1979ccae3b94da3cb8dc2dab3f731bd4b25867a5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Einar=20Bjarni=20Halld=C3=B3rsson?= <einar@isnic.is> >Date: Mon, 24 Mar 2025 14:53:01 +0000 >Subject: [PATCH] Add rc script for devel/athens and sample config file > >--- > devel/athens/Makefile | 8 +++++++- > devel/athens/files/athens.in | 33 +++++++++++++++++++++++++++++++++ > devel/athens/pkg-plist | 2 ++ > 3 files changed, 42 insertions(+), 1 deletion(-) > create mode 100644 devel/athens/files/athens.in > create mode 100644 devel/athens/pkg-plist > >diff --git a/devel/athens/Makefile b/devel/athens/Makefile >index e4b357c64945..550b2f092a7f 100644 >--- a/devel/athens/Makefile >+++ b/devel/athens/Makefile >@@ -12,6 +12,7 @@ LICENSE= MIT > LICENSE_FILE= ${WRKSRC}/LICENSE > > USES= go:1.22,modules >+USE_RC_SUBR= ${PORTNAME} > > BUILD_DATE= 2024-11-04-00:00:00-UTC > >@@ -21,9 +22,14 @@ GO_BUILDFLAGS= -ldflags " \ > -X github.com/gomods/${PORTNAME}/pkg/build.version=${DISTVERSION} \ > -X github.com/gomods/${PORTNAME}/pkg/build.buildDate=${BUILD_DATE}" > >-PLIST_FILES= bin/${PORTNAME} >+post-stage: >+ ${INSTALL_DATA} ${WRKSRC}/config.dev.toml ${STAGEDIR}${ETCDIR}/athens.toml.sample > > do-install: > ${INSTALL_PROGRAM} ${WRKDIR}/bin/proxy ${STAGEDIR}${PREFIX}/bin/${PORTNAME} > >+post-install: >+ ${MKDIR} ${STAGEDIR}${ETCDIR} >+ ${INSTALL_DATA} ${BUILD_WRKSRC}/config.dev.toml ${STAGEDIR}${ETCDIR}/athens.toml.sample >+ > .include <bsd.port.mk> >diff --git a/devel/athens/files/athens.in b/devel/athens/files/athens.in >new file mode 100644 >index 000000000000..eeac17bdcf33 >--- /dev/null >+++ b/devel/athens/files/athens.in >@@ -0,0 +1,33 @@ >+#!/bin/sh >+# >+# PROVIDE: athens >+# REQUIRE: networking >+# KEYWORD: shutdown >+# >+# athens_enable (bool): >+# Default value: "NO" >+# Flag that determines whether athens is enabled >+# >+# athens_config (string) >+# Default value /usr/local/etc/athens/athens.toml >+# Path to the athens configuration file >+# >+ >+. /etc/rc.subr >+ >+: ${athens_enable:="NO"} >+: ${athens_config:="/usr/local/etc/athens/athens.toml"} >+ >+name=athens >+rcvar=athens_enable >+athens_command="/usr/local/bin/athens -config_file ${athens_config}" >+command="/usr/sbin/daemon" >+command_args="-S ${athens_command}" >+ >+PATH="${PATH}:/usr/local/bin" >+ >+load_rc_config $name >+ >+required_files="${athens_config}" >+ >+run_rc_command "$1" >diff --git a/devel/athens/pkg-plist b/devel/athens/pkg-plist >new file mode 100644 >index 000000000000..eab1987cedac >--- /dev/null >+++ b/devel/athens/pkg-plist >@@ -0,0 +1,2 @@ >+@sample %%ETCDIR%%/athens.toml.sample >+bin/athens >-- >2.39.5 (Apple Git-154) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 285628
:
258975
|
259019
Working