mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
bea827cf4c
This release fixes a large number of bugs and introduces many new features. Release notes: - https://blog.gitea.io/2020/06/gitea-1.12.0-and-1.12.1-are-released/ - https://blog.gitea.io/2020/07/gitea-1.12.2-is-released/ Additional changes to the port: - Use PORTDATA to avoid enumerating the extensive DATADIR - Add option to rc file for custom path [1] - Turn the BINDATA option on by default PR: 247613, 247989 [1] Submitted by: maintainer, mikeg bsd-box net [1] Approved by: maintainer [1]
48 lines
918 B
Bash
48 lines
918 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: gitea
|
|
# REQUIRE: NETWORKING SYSLOG
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable gitea:
|
|
#
|
|
#gitea_enable="YES"
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="gitea"
|
|
rcvar="gitea_enable"
|
|
|
|
load_rc_config $name
|
|
|
|
: ${gitea_user:="%%GITUSER%%"}
|
|
: ${gitea_enable:="NO"}
|
|
: ${gitea_facility:="daemon"}
|
|
: ${gitea_priority:="debug"}
|
|
: ${gitea_shared:="%%PREFIX%%/share/${name}"}
|
|
: ${gitea_custom:="%%PREFIX%%/etc/${name}"}
|
|
|
|
command="%%PREFIX%%/sbin/${name} web"
|
|
procname="%%PREFIX%%/sbin/${name}"
|
|
githome="$(eval echo ~${gitea_user})"
|
|
|
|
pidfile="/var/run/${name}.pid"
|
|
|
|
start_cmd="${name}_start"
|
|
|
|
gitea_start() {
|
|
/usr/sbin/daemon %%DAEMONARGS%% \
|
|
-u ${gitea_user} -p ${pidfile} \
|
|
/usr/bin/env -i \
|
|
"GITEA_WORK_DIR=${gitea_shared}" \
|
|
"GITEA_CUSTOM=${gitea_custom}" \
|
|
"HOME=${githome}" \
|
|
"PATH=%%PREFIX%%/bin:${PATH}" \
|
|
"USER=${gitea_user}" \
|
|
$command
|
|
}
|
|
|
|
run_rc_command "$1"
|