summaryrefslogtreecommitdiffstats
path: root/contrib/init/gentoo/gitea
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
commit65aa53fc52ff15efe54df4147564828d535837f8 (patch)
tree31c51dad04fdcca80e6d3043c8bd49d2f1a51f83 /contrib/init/gentoo/gitea
parentInitial commit. (diff)
downloadforgejo-upstream.tar.xz
forgejo-upstream.zip
Adding upstream version 8.0.3.HEADupstream/8.0.3upstreamdebian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/init/gentoo/gitea')
-rw-r--r--contrib/init/gentoo/gitea44
1 files changed, 44 insertions, 0 deletions
diff --git a/contrib/init/gentoo/gitea b/contrib/init/gentoo/gitea
new file mode 100644
index 00000000..db904e7b
--- /dev/null
+++ b/contrib/init/gentoo/gitea
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+
+DIR=/var/lib/gitea
+USER=git
+HOME=/home/${USER}
+GITEA_WORK_DIR=${DIR}
+EXECUTABLE=/usr/local/bin/gitea
+
+export USER
+export HOME
+export GITEA_WORK_DIR
+
+name=$RC_SVCNAME
+cfgfile="/etc/$RC_SVCNAME/app.ini"
+command="${EXECUTABLE}"
+command_user="${USER}"
+command_args="web -c /etc/$RC_SVCNAME/app.ini"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
+start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
+
+depend()
+{
+ need net
+ ###
+ # Don't forget to add the database service requirements
+ ###
+ #after postgresql
+ #after mysql
+ #after mariadb
+ #after memcached
+ #after redis
+}
+
+start_pre()
+{
+ checkpath --directory --owner $command_user:$command_user --mode 0750 \
+ /run/$RC_SVCNAME /var/log/$RC_SVCNAME
+ ##
+ # If you want to bind Gitea to a port below 1024, uncomment
+ # the value below
+ ##
+ #setcap cap_net_bind_service=+ep "${EXECUTABLE}"
+}