#!/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}