Add Anki Sync Server addon (self-hosted flashcard sync)

Installs the official self-hosted anki-sync-server (python -m
anki.syncserver from PyPI's anki package, no Qt/GUI deps) as a
systemd service under $KIOSK_USER, same shape as the Web UI addon:
venv under $ANKI_SYNC_DIR, EnvironmentFile under $ANKI_SYNC_ENV_DIR
(chmod 600 since it holds plaintext sync passwords), multi-user
support via SYNC_USER1/2/... Lets Anki desktop/AnkiDroid clients on
the LAN sync flashcards against this kiosk instead of AnkiWeb.

Added to the existing Addons menu rather than a new top-level
category - Addons is already a flat mix of unrelated self-hosted
services (printing, telephony, media server, remote access), so one
more service fits that pattern instead of fragmenting the menu
structure for a single item.

Wired into complete_uninstall.sh, clone_settings.sh's addon
detection/checklist, and the webui helper script's source list (which
documents itself as mirroring install.sh's sources exactly).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NoqDrsMq2dazAwGU1AodNc
This commit is contained in:
Claude
2026-09-09 13:47:43 +00:00
parent 08b33ef823
commit 75baab8914
7 changed files with 335 additions and 4 deletions
+8 -3
View File
@@ -37,7 +37,10 @@
# Display/Lockout, the webui/ Node app installed as a systemd
# service; no login of its own, put it behind your own reverse proxy
# with Authelia forward-auth if it needs to be reachable beyond a
# trusted LAN - see the file header).
# trusted LAN - see the file header), Anki Sync Server
# (menus/addon_anki_sync.sh - self-hosted flashcard sync via the
# official `python -m anki.syncserver`, for Anki desktop/AnkiDroid
# clients on the LAN instead of AnkiWeb).
# Advanced: Diagnostics (menus/diagnostics.sh - system status/logs/
# audio/network), Electron Maintenance (menus/advanced_electron.sh -
# manual update, fix blank screen), Factory Reset
@@ -94,6 +97,8 @@ source "$SCRIPT_DIR/menus/addon_lms_squeezelite.sh"
source "$SCRIPT_DIR/menus/addon_asterisk_intercom.sh"
# shellcheck source=menus/addon_webui.sh
source "$SCRIPT_DIR/menus/addon_webui.sh"
# shellcheck source=menus/addon_anki_sync.sh
source "$SCRIPT_DIR/menus/addon_anki_sync.sh"
# shellcheck source=menus/advanced_electron.sh
source "$SCRIPT_DIR/menus/advanced_electron.sh"
# shellcheck source=menus/advanced_upgrade.sh
@@ -174,8 +179,8 @@ core_settings_menu() {
}
addons_menu_builder() {
MENU_LABELS=("CUPS Printing" "Authelia Auto-Login" "Remote Access" "LMS Server / Squeezelite Player" "Asterisk Intercom (SIP Extension)" "Web UI")
MENU_HANDLERS=(addon_cups_menu addon_authelia_menu remote_access_menu addon_lms_squeezelite_menu addon_asterisk_intercom_menu addon_webui_menu)
MENU_LABELS=("CUPS Printing" "Authelia Auto-Login" "Remote Access" "LMS Server / Squeezelite Player" "Asterisk Intercom (SIP Extension)" "Web UI" "Anki Sync Server")
MENU_HANDLERS=(addon_cups_menu addon_authelia_menu remote_access_menu addon_lms_squeezelite_menu addon_asterisk_intercom_menu addon_webui_menu addon_anki_sync_menu)
}
addons_menu() {