pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gitea-runner: add an RC file



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Sun Aug 30 18:03:37 2026 +0200
Changeset:	b1e524864a880b319ec68eba51f730bf46977f9c

Modified Files:
	gitea-runner/Makefile
Added Files:
	gitea-runner/files/gitea-runner.sh

Log Message:
gitea-runner: add an RC file

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b1e524864a880b319ec68eba51f730bf46977f9c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gitea-runner/Makefile              |  6 ++++++
 gitea-runner/files/gitea-runner.sh | 26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diffs:
diff --git a/gitea-runner/Makefile b/gitea-runner/Makefile
index 0f41999932..d31ded134a 100644
--- a/gitea-runner/Makefile
+++ b/gitea-runner/Makefile
@@ -19,6 +19,7 @@ BUILD_DEFS+=	VARBASE GITEA_RUNNER_USER GITEA_RUNNER_GROUP
 
 EGDIR=		${PREFIX}/share/examples/gitea-runner
 
+OWN_DIRS_PERMS+=	${VARBASE}/db/gitea-runner ${GITEA_RUNNER_USER} ${GITEA_RUNNER_GROUP} 0700
 OWN_DIRS_PERMS+=	${PKG_SYSCONFDIR} ${GITEA_RUNNER_USER} ${GITEA_RUNNER_GROUP} 0755
 
 GITEA_RUNNER_USER?=	runner
@@ -43,6 +44,11 @@ SUBST_VARS.fix-var=	VARBASE
 CONF_FILES_PERMS+=	${EGDIR}/config.yaml ${PKG_SYSCONFDIR}/config.yaml \
 			${GITEA_RUNNER_USER} ${GITEA_RUNNER_GROUP} 0600
 
+FILES_SUBST+=		GITEA_RUNNER_USER=${GITEA_RUNNER_USER}
+FILES_SUBST+=		GITEA_RUNNER_GROUP=${GITEA_RUNNER_GROUP}
+
+RCD_SCRIPTS+=		gitea-runner
+
 pre-patch:
 	${CP} ${FILESDIR}/config.yaml ${WRKDIR}/
 
diff --git a/gitea-runner/files/gitea-runner.sh b/gitea-runner/files/gitea-runner.sh
new file mode 100644
index 0000000000..a8a3865651
--- /dev/null
+++ b/gitea-runner/files/gitea-runner.sh
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: gitea-runner
+# REQUIRE: DAEMON
+#
+# You will need to set some variables in @SYSCONFBASE@/rc.conf to start gitea-runner:
+#
+# gitea_runner=YES
+
+$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
+
+name="gitea_runner"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/config.yaml"
+command="@PREFIX@/bin/gitea-runner"
+command_args="--config @PKG_SYSCONFDIR@/config.yaml daemon > /dev/null &"
+
+gitea_runner_user="@GITEA_RUNNER_USER@"
+gitea_runner_group="@GITEA_RUNNER_GROUP@"
+
+cd /
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index