Подготовить HY2XS к production-сборке
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import type { InstallContext } from "../types/context";
|
||||
import { info } from "../lib/log";
|
||||
import { runVisible } from "../lib/process";
|
||||
|
||||
export async function smoke(context: InstallContext): Promise<void> {
|
||||
if (context.options.skipStart) {
|
||||
info("service start and smoke checks skipped by flag");
|
||||
return;
|
||||
}
|
||||
|
||||
await runVisible`systemctl start hysteria-server hy2xs-admin`;
|
||||
await runVisible`systemctl is-active --quiet hysteria-server`;
|
||||
await runVisible`systemctl is-active --quiet hy2xs-admin`;
|
||||
await runVisible`/usr/local/bin/hysteria version`;
|
||||
await runVisible`test -s /etc/hysteria/config.yaml`;
|
||||
await runVisible`test -s /etc/hysteria/post-install.env`;
|
||||
await runVisible`ss -H -lntu | grep -q ':${context.options.uiPort} '`;
|
||||
await runVisible`curl -fsS --max-time 5 http://127.0.0.1:${context.options.uiPort}/ >/dev/null`;
|
||||
}
|
||||
Reference in New Issue
Block a user