From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- contrib/init/openwrt/gitea | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 contrib/init/openwrt/gitea (limited to 'contrib/init/openwrt/gitea') diff --git a/contrib/init/openwrt/gitea b/contrib/init/openwrt/gitea new file mode 100644 index 0000000..67b4495 --- /dev/null +++ b/contrib/init/openwrt/gitea @@ -0,0 +1,35 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 + +# PROCD_DEBUG=1 + +START=90 +STOP=10 + +PROG=/opt/gitea/gitea +GITEA_WORK_DIR=/opt/gitea +CONF_FILE=$GITEA_WORK_DIR/app.ini + +start_service(){ + procd_open_instance gitea + procd_set_param env GITEA_WORK_DIR=$GITEA_WORK_DIR + procd_set_param env HOME=$GITEA_WORK_DIR + procd_set_param command $PROG web -c $CONF_FILE + procd_set_param file $CONF_FILE + procd_set_param user git + procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} # respawn automatically if something died, be careful if you have an alternative process supervisor + procd_close_instance +} + +start(){ + service_start $PROG +} + +stop(){ + service_stop $PROG +} + +reload(){ + service_reload $PROG +} -- cgit v1.2.3