Add TLS feature with Caddy
This commit is contained in:
@@ -5,6 +5,7 @@ import type { ApiReqParams } from "@/src/types";
|
||||
import type { APIResponseObject } from "@moduletrace/bunext/types";
|
||||
import type useSystemSetupStatus from "../(hooks)/use-system-setup-status";
|
||||
import SetupActionRow from "../(partials)/setup-action-row";
|
||||
import SetupCaddyAction from "../(partials)/setup-caddy-action";
|
||||
import SetupUpdateWgUiAction from "../(partials)/setup-update-wg-ui-action";
|
||||
|
||||
type Props = {
|
||||
@@ -24,6 +25,11 @@ export default function SetupActionsSection({ setup }: Props) {
|
||||
.filter((tool) => WG_TOOL_COMMANDS.includes(tool.command))
|
||||
.every((tool) => tool.installed);
|
||||
|
||||
const have_caddy = Boolean(
|
||||
setup_status.tools.find((tool) => tool.command == "/opt/caddy/caddy")
|
||||
?.installed,
|
||||
);
|
||||
|
||||
const show_restart = !setup_status.is_dev && setup_status.init_system !== "unknown";
|
||||
|
||||
return (
|
||||
@@ -43,6 +49,11 @@ export default function SetupActionsSection({ setup }: Props) {
|
||||
}}
|
||||
/>
|
||||
|
||||
<SetupCaddyAction
|
||||
installed={have_caddy}
|
||||
on_done={() => setup.refresh()}
|
||||
/>
|
||||
|
||||
<SetupUpdateWgUiAction setup={setup} />
|
||||
|
||||
{show_restart ? (
|
||||
|
||||
Reference in New Issue
Block a user