#!/usr/bin/env bash
# onx-apache-reload — Alias for onx-vhost-reload.
# Runs apachectl configtest then systemctl reload httpd.
#
# Input (stdin JSON): {} (no fields required)
#
# Output (stdout JSON):
#   {"reloaded":true, "uptime":...}
#
# Exit codes: 0=ok 2=preflight-fail 3=exec-fail
#
# Deployed to: /usr/local/onoxsoft/bin/onx-apache-reload

set -euo pipefail

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
# shellcheck source=_lib/common.sh
source "${SCRIPT_DIR}/_lib/common.sh"

# Delegate entirely to onx-vhost-reload (same logic, different name for clarity)
exec "${SCRIPT_DIR}/onx-vhost-reload"
