generic doctor usage
This commit is contained in:
parent
d931f53612
commit
4dc1cfd5f2
1 changed files with 28 additions and 0 deletions
28
bin/forgejo_usedoc.sh
Executable file
28
bin/forgejo_usedoc.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/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}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue