29 lines
1.3 KiB
Bash
Executable File
29 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
printf '%s\n' '=== local panel listener ==='
|
|
panel_port="$(tr -cd '0-9' </www/server/panel/data/port.pl)"
|
|
printf 'panel_port=%s\n' "${panel_port}"
|
|
for scheme in http https; do
|
|
code="$(curl --insecure --silent --output /dev/null --write-out '%{http_code}' --max-time 5 "${scheme}://127.0.0.1:${panel_port}/" || true)"
|
|
printf '%s=%s\n' "${scheme}" "${code}"
|
|
done
|
|
|
|
printf '%s\n' '=== certificate clients ==='
|
|
for candidate in /root/.acme.sh/acme.sh /www/server/panel/pyenv/bin/python3 /usr/bin/certbot; do
|
|
if [[ -e "${candidate}" ]]; then
|
|
stat -Lc '%A %a %U:%G %n' "${candidate}"
|
|
fi
|
|
done
|
|
|
|
printf '%s\n' '=== deployment state ==='
|
|
stat -Lc '%A %a %U:%G %n' /etc/sea-vhost/sea-vhost.env /opt/sea-vhost/web /www/server/panel/vhost/nginx 2>&1
|
|
find /www/server/panel/vhost/cert/host.ser888.cn -maxdepth 1 -type f -printf '%M %u:%g %f %s bytes\n' 2>/dev/null || true
|
|
systemctl is-enabled sea-vhost-agent sea-vhost-panel-broker sea-vhost-api 2>&1 || true
|
|
systemctl is-active sea-vhost-agent sea-vhost-panel-broker sea-vhost-api 2>&1 || true
|
|
ss -lnt | grep -E '(:80|:443|:8080|:3306)[[:space:]]' || true
|
|
|
|
printf '%s\n' '=== domain resolution ==='
|
|
getent ahostsv4 host.ser888.cn | head -n 3 || true
|
|
getent ahostsv4 sv0123456789.vhost.ser888.cn | head -n 3 || true
|