www/bin/forgejo_usedoc.sh
2025-10-26 05:11:01 -05:00

28 lines
396 B
Bash
Executable file

#!/usr/bin/env bash
#
# Run Forgejo doctor
#
# SPDX-License-Identifier: MIT
_VERSION="0.0.1"
GCNF="/var/xyzzy/etc/forgejo/app.ini"
GBIN="/var/xyzzy/bin/forgejo"
if [[ $(id -u) -ne 0 ]]; then
echo "Must run as root user"
exit 1
fi
# fallback
if [[ $# -eq 0 ]]; then
_OPTS="--help"
else
_OPTS="$@"
fi
runuser -u git -- "${GBIN}" doctor --config "${GCNF}" ${_OPTS}
_EC=$?
exit ${_EC}