Files
syncwarden/internal/syncthing/detect.go
Axel Meyer 99eeffcbe4
Some checks failed
Release / build (push) Failing after 2m53s
Detect missing Syncthing, rewrite README with architecture diagram
Add Syncthing installation detection (PATH + config file check) to both
the tray app and setup installer. When missing, the tray shows an
"Install Syncthing..." menu item and the setup opens the download page.

Rewrite README with Mermaid topology graph, per-binary dependency tables,
project layout, API endpoint reference, and shields.io badges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:08:34 +01:00

24 lines
545 B
Go

package syncthing
import (
"os"
"os/exec"
"git.davoryn.de/calic/syncwarden/internal/config"
)
// DownloadURL is the official Syncthing downloads page.
const DownloadURL = "https://syncthing.net/downloads/"
// IsInstalled returns true if Syncthing appears to be installed.
// It checks both PATH and the existence of a Syncthing config file.
func IsInstalled() bool {
if _, err := exec.LookPath("syncthing"); err == nil {
return true
}
if _, err := os.Stat(config.SyncthingConfigPath()); err == nil {
return true
}
return false
}