This repository has been archived on 2026-10-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
karldns.de/karldns/web/templates_public_sections.py
T

34 lines
1.5 KiB
Python

from __future__ import annotations
from .components import _code_window
from .html_utils import SafeHtml, trusted
def _linux_installer_section(base_url: str) -> SafeHtml:
base_url = base_url.rstrip("/")
system_install = f"curl -fsSL {base_url}/install.sh | sudo sh"
system_uninstall = f"curl -fsSL {base_url}/uninstall.sh | sudo sh"
return trusted(f"""
<section class="section" id="linux-installer">
<div class="container narrow">
<div class="text-center mb-4">
<p class="eyebrow">Linux cron updater</p>
<h2>Linux updater.</h2>
<p class="section-copy mx-auto">Run this on a Linux box that is always on. It creates and registers a hostname, installs the updater, schedules cron, and prints your private dashboard link. Works with Debian, Ubuntu, Fedora, Arch, Alpine, and Proxmox hosts.</p>
</div>
<div class="installer-commands">
<div class="installer-command">
<h3>Install</h3>
<p class="section-copy">Sets up the updater and cron job.</p>
{_code_window(system_install, copy_label="install command", class_name="mt-3")}
</div>
<div class="installer-command">
<h3>Uninstall</h3>
<p class="section-copy">Stops the updater and leaves private URLs on disk.</p>
{_code_window(system_uninstall, copy_label="uninstall command", class_name="mt-3")}
</div>
</div>
</div>
</section>
""")