Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
41 lines
923 B
Bash
Executable File
41 lines
923 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#############################################################################
|
|
# This script sets some defaults for gitea to run in a FHS compliant manner #
|
|
#############################################################################
|
|
|
|
# It assumes that you place this script as gitea in /usr/bin
|
|
#
|
|
# And place the original in /usr/lib/gitea with working files in /var/lib/gitea
|
|
# and main configuration in /etc/gitea/app.ini
|
|
GITEA="/usr/lib/gitea/gitea"
|
|
WORK_DIR="/var/lib/gitea"
|
|
APP_INI="/etc/gitea/app.ini"
|
|
|
|
APP_INI_SET=""
|
|
for i in "$@"; do
|
|
case "$i" in
|
|
"-c")
|
|
APP_INI_SET=1
|
|
;;
|
|
"-c="*)
|
|
APP_INI_SET=1
|
|
;;
|
|
"--config")
|
|
APP_INI_SET=1
|
|
;;
|
|
"--config="*)
|
|
APP_INI_SET=1
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ -z "$APP_INI_SET" ]; then
|
|
CONF_ARG=("-c" "${GITEA_APP_INI:-$APP_INI}")
|
|
fi
|
|
|
|
# Provide FHS compliant defaults
|
|
GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" exec -a "$0" "$GITEA" "${CONF_ARG[@]}" "$@"
|