add forgejo_doctor.sh
This commit is contained in:
parent
6e9f34a20f
commit
6a3f4b1917
1 changed files with 22 additions and 0 deletions
22
bin/forgejo_doctor.sh
Executable file
22
bin/forgejo_doctor.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/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}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue