22 lines
364 B
Bash
Executable file
22 lines
364 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
|
|
|
|
runuser -u git -- "${GBIN}" doctor --config "${GCNF}" check --all \
|
|
--log-file /tmp/forgejo_doctor.log
|
|
_EC=$?
|
|
|
|
exit ${_EC}
|
|
|