import React from "react"; import { Button } from "@/components/ui/button"; import { Copy, Terminal } from "lucide-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { copyToClipboard } from "@/utils/copyUtils"; interface ManualInstallTabProps { serverToken: string; currentPocketBaseUrl: string; formData: { serverName: string; osType: string; checkInterval: string; }; serverId: string; onDialogClose: () => void; } export const ManualInstallTab: React.FC = ({ serverToken, currentPocketBaseUrl, formData, serverId, onDialogClose, }) => { const getManualInstallSteps = () => { const scriptUrl = "https://raw.githubusercontent.com/operacle/checkcle/refs/heads/main/scripts/server-agent.sh"; return [ { title: "Download the installation script", command: `curl -L -o server-agent.sh "${scriptUrl}"` }, { title: "Make the script executable", command: `chmod +x server-agent.sh` }, { title: "Run the installation with your configuration", command: `SERVER_TOKEN="${serverToken}" POCKETBASE_URL="${currentPocketBaseUrl}" SERVER_NAME="${formData.serverName}" AGENT_ID="${serverId}" sudo bash server-agent.sh` } ]; }; return ( Manual Installation Steps Step-by-step installation process
Server Name: {formData.serverName}
Agent ID: {serverId}
OS Type: {formData.osType}
Check Interval: {formData.checkInterval}s
{getManualInstallSteps().map((step, index) => (
{index + 1} {step.title}
                  {step.command}
                
))}

Prerequisites:

  • Ensure you have root/sudo access on the target server
  • Make sure curl is installed for downloading files
  • Internet connection required for downloading script

After Installation:

The agent will start automatically and appear in your dashboard within a few minutes.

); };