diff options
author | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-12-12 23:57:56 +0100 |
commit | e68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch) | |
tree | 97775d6c13b0f416af55314eb6a89ef792474615 /contrib/init/gentoo/gitea | |
parent | Initial commit. (diff) | |
download | forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip |
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r-- | contrib/init/gentoo/gitea | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/contrib/init/gentoo/gitea b/contrib/init/gentoo/gitea new file mode 100644 index 0000000..db904e7 --- /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}" +} |