Changeset View
Changeset View
Standalone View
Standalone View
www/gitea/files/gitea.in
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | /usr/sbin/daemon %%DAEMONARGS%% \ | ||||
| "HOME=${githome}" \ | "HOME=${githome}" \ | ||||
| "PATH=%%PREFIX%%/bin:${PATH}" \ | "PATH=%%PREFIX%%/bin:${PATH}" \ | ||||
| "USER=${gitea_user}" \ | "USER=${gitea_user}" \ | ||||
| $command | $command | ||||
| } | } | ||||
| gitea_prestart() { | gitea_prestart() { | ||||
| if checkyesno gitea_configcheck_enable; then | if checkyesno gitea_configcheck_enable; then | ||||
| if su -m ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then | if /usr/bin/env -i \ | ||||
| "GITEA_WORK_DIR=${gitea_shared}" \ | |||||
| "GITEA_CUSTOM=${gitea_custom}" \ | |||||
| "HOME=${githome}" \ | |||||
| "PATH=%%PREFIX%%/bin:${PATH}" \ | |||||
| "USER=${gitea_user}" \ | |||||
| su -m ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then | |||||
| else | else | ||||
| echo "cannot start ${name} because of configuration errors. Run" >&2 | echo "cannot start ${name} because of configuration errors. Run" >&2 | ||||
| echo " su -m git -c '${name} doctor check'" >&2 | echo " su -m git -c '${name} doctor check'" >&2 | ||||
| echo "for further details" | echo "for further details" | ||||
| return 1 | return 1 | ||||
| fi | fi | ||||
| fi | fi | ||||
| } | } | ||||
| run_rc_command "$1" | run_rc_command "$1" | ||||